专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

jenkins/ssh-agent Docker 镜像 - 轩辕镜像

ssh-agent
jenkins/ssh-agent
这是一个用于通过SSH连接的Jenkins代理的Docker镜像,它预配置了SSH服务及Jenkins代理运行所需的基础依赖,旨在简化分布式构建环境中Jenkins代理节点的部署流程,支持代理节点通过SSH安全连接至Jenkins主节点并执行构建任务,帮助用户快速搭建稳定、高效的Jenkins分布式构建架构,适用于需要跨节点协作完成自动化构建、测试与部署的开发场景。
66 收藏0 次下载
🚀专业版镜像服务,面向生产环境设计
版本下载
🚀专业版镜像服务,面向生产环境设计

Docker image for Jenkins agents connected over SSH

![Join the chat at []]([] ![GitHub stars]([] ![Docker Pulls]([] ![GitHub release]([***]

A Jenkins agent image which allows using SSH to establish the connection. It can be used together with the SSH Build Agents plugin or other similar plugins.

See Jenkins Distributed builds for more info.

Running

Running with the SSH Build Agents plugin

To run a Docker container

bash
docker run -d --rm --name=agent --publish 2200:22 -e "JENKINS_AGENT_SSH_PUBKEY=<public_key>" jenkins/ssh-agent
  • -d: To start a container in detached mode, use the -d option. Containers started in detached mode exit when the root process used to run the container exits, unless you also specify the --rm option.
  • --rm: If you use -d with --rm, the container is removed when it exits or when the daemon exits, whichever happens first.
  • --name: Assigns a name to the container. If you do not specify a name, Docker generates a random name.
  • --publish 2200:22: Publishes the host port 2200 to the agent container port 22 (SSH) to allow connection from the host with ssh jenkins@localhost -p 2200

Please note none of these options are mandatory, they are just examples.

You will then be able to connect this agent using the SSH Build Agents plugin as "jenkins" with the matching private key.

When using the Linux image, you have to set the value of the Remote root directory to /home/jenkins/agent in the agent configuration UI.

!Remote root directory with a Linux agent

When using the Windows image, you have to set the value of the Remote root directory to C:/Users/jenkins/Work in the agent configuration UI.

!Remote root directory with a Windows agent

If you intend to use another directory than /home/jenkins/agent under Linux or C:/Users/jenkins/Work under Windows, don't forget to add it as a data volume.

bash
docker run -v docker-volume-for-jenkins-ssh-agent:/home/jenkins/agent:rw jenkins/ssh-agent "<public key>"
How to use this image with Docker Plugin

To use this image with Docker Plugin, you need to pass the public SSH key using environment variable JENKINS_AGENT_SSH_PUBKEY and not as a startup argument.

In Environment field of the Docker Template (advanced section), just add:

JENKINS_AGENT_SSH_PUBKEY=<YOUR PUBLIC SSH KEY HERE>

Don't put quotes around the public key.

Please note that you have to set the value of the Remote File System Root to /home/jenkins/agent in the Docker Agent Template configuration UI.

!Remote File System Root

If you intend to use another directory than /home/jenkins/agent, don't forget to add it as a data volume.

!Docker Volumes mounts

You should be all set.

Extending the image

Should you need to extend the image, you could use something along those lines:

Dockerfile
FROM jenkins/ssh-agent:debian-jdk17 as ssh-agent
# [...]
COPY --chown=jenkins mykey "${JENKINS_AGENT_HOME}"/.ssh/mykey
# [...]

Configurations

The image has several supported configurations, which can be accessed via the following tags:

${IMAGE_VERSION} can be found on the releases page.

  • latest, latest-jdk11, jdk11, latest-bullseye-jdk11, bullseye-jdk11, latest-debian-jdk11, debian-jdk11, ${IMAGE_VERSION}, ${IMAGE_VERSION}-jdk11, (Dockerfile)
  • latest-jdk17, jdk17, latest-bullseye-jdk17, bullseye-jdk17,latest-debian-jdk17, debian-jdk17, ${IMAGE_VERSION}-jdk17, (Dockerfile)
  • nanoserver-1809, nanoserver-ltsc2019, nanoserver-1809-jdk11, nanoserver-ltsc2019-jdk11, ${IMAGE_VERSION}-nanoserver-1809, ${IMAGE_VERSION}-nanoserver-ltsc2019, ${IMAGE_VERSION}-nanoserver-1809-jdk11, ${IMAGE_VERSION}-nanoserver-ltsc2019-jdk11 (Dockerfile)
  • windowsservercore-1809, windowsservercore-ltsc2019, windowsservercore-1809-jdk11, windowsservercore-ltsc2019-jdk11, ${IMAGE_VERSION}-windowsservercore-1809, ${IMAGE_VERSION}-windowsservercore-ltsc2019, ${IMAGE_VERSION}-windowsservercore-1809-jdk11, ${IMAGE_VERSION}-windowsservercore-ltsc2019-jdk11 (Dockerfile)

Building instructions

Pre-requisites

Should you want to build this image on your machine (before submitting a pull request for example), please have a look at the pre-requisites:

  • A GNU/Linux machine with Docker, a macOS machine with Docker Desktop, or a Windows machine with Docker for Windows installed
  • Docker BuildX plugin installed on older versions of Docker (from 19.03). Docker Buildx is included in recent versions of Docker Desktop for Windows, macOS, and Linux. Docker Linux packages also include Docker Buildx when installed using the DEB or RPM packages.
  • GNU Make installed
  • jq installed
  • GNU Bash installed
  • git installed
  • curl installed
Building
Target images

If you want to see the target images that will be built, you can issue the following command:

bash
make list
alpine_jdk11
alpine_jdk17
debian_jdk11
debian_jdk17
Building a specific image

If you want to build a specific image, you can issue the following command:

bash
make build-<OS>_<JDK_VERSION>

That would give for JDK 11 on Alpine Linux:

bash
make test-alpine_jdk11
Building all images

Then, you can build all the images by running:

bash
make build
Testing all images

If you want to test the images, you can run:

bash
make test
Testing a specific image

If you want to test a specific image, you can run:

bash
make test-<OS>_<JDK_VERSION>

That would give for JDK 11 on Alpine Linux:

bash
make test-alpine_jdk11
Other make targets

show gives us a detailed view of the images that will be built, with the tags, platforms, and Dockerfiles.

bash
make show
{
  "group": {
    "default": {
      "targets": [
        "alpine_jdk17",
        "alpine_jdk11",
        "debian_jdk11",
        "debian_jdk17"
      ]
    }
  },
  "target": {
    "alpine_jdk11": {
      "context": ".",
      "dockerfile": "alpine/Dockerfile",
      "tags": [
        "docker.io/jenkins/ssh-agent:alpine-jdk11",
        "docker.io/jenkins/ssh-agent:latest-alpine-jdk11"
      ],
      "platforms": [
        "linux/amd64"
      ],
      "output": [
        "type=docker"
      ]
    },
    [...]

bats is a dependency target. It will update the bats submodule and run the tests.

bash
make bats
make: 'bats' is up to date.

Changelog

See GitHub Releases. Note that the changelogs and release tags were introduced in Dec 2019, and there are no entries for previous releases. Please consult with the commit history if needed.

查看更多 ssh-agent 相关镜像 →
jenkins/jenkins logo
jenkins/jenkins
这是一款领先的开源自动化服务器,主要用于软件开发中的持续集成、持续部署(CI/CD)及各类自动化流程管理,支持代码构建、自动化测试、应用部署等全流程任务,具备高度可扩展性、跨平台运行能力和丰富的插件生态,能显著提升开发效率、简化复杂操作并降低运维成本,在全球开发者社区和企业中拥有广泛应用与良好口碑。
42151B+ pulls
上次更新:2 天前
jenkins logo
jenkins
官方
该英文提示意为“已弃用;请改用‘jenkins/jenkins:lts’”。需要说明的是,此内容为简洁的技术状态提示,核心信息已完整传达,若强行扩展至100-160字会导致信息冗余,不符合技术提示的简洁性原则。建议以准确传达核心信息为准,即“此版本已弃用,请使用‘jenkins/jenkins:lts’替代”。
5703100M+ pulls
上次更新:7 年前
jenkins/inbound-agent logo
jenkins/inbound-agent
这是一个用于Jenkins代理的镜像,该镜像支持通过TCP或WebSocket协议建立入站连接至Jenkins控制器,旨在实现代理与控制器之间的稳定通信,确保Jenkins任务能够在代理节点上顺利执行,适用于需要灵活配置网络连接方式的Jenkins环境,为分布式构建和部署提供可靠的基础设施支持。
147100M+ pulls
上次更新:1 天前
jenkins/slave logo
jenkins/slave
Jenkins Agent的基础镜像,包含Java运行时和Jenkins代理(slave.jar),但已被弃用,推荐使用"jenkins/agent"作为替代。
5310M+ pulls
上次更新:3 年前
jenkins/jnlp-agent-maven logo
jenkins/jnlp-agent-maven
基于JNLP协议的代理镜像,内置Maven 3构建工具,适用于Jenkins等CI/CD系统作为分布式构建节点,执行Maven项目构建任务。
10100M+ pulls
上次更新:1 天前
jenkins/agent logo
jenkins/agent
提供Jenkins代理可执行文件agent.jar的基础镜像。
7810M+ pulls
上次更新:1 天前

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
jenkins/ssh-agent
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
提交工单
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.