jenkins/ssh-agent![Join the chat at []]([]  to allow connection from the host with ssh jenkins@localhost -p 2200Please 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.
bashdocker run -v docker-volume-for-jenkins-ssh-agent:/home/jenkins/agent:rw jenkins/ssh-agent "<public key>"
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.
Should you need to extend the image, you could use something along those lines:
DockerfileFROM jenkins/ssh-agent:debian-jdk17 as ssh-agent # [...] COPY --chown=jenkins mykey "${JENKINS_AGENT_HOME}"/.ssh/mykey # [...]
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)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:
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.If you want to see the target images that will be built, you can issue the following command:
bashmake list alpine_jdk11 alpine_jdk17 debian_jdk11 debian_jdk17
If you want to build a specific image, you can issue the following command:
bashmake build-<OS>_<JDK_VERSION>
That would give for JDK 11 on Alpine Linux:
bashmake test-alpine_jdk11
Then, you can build all the images by running:
bashmake build
If you want to test the images, you can run:
bashmake test
If you want to test a specific image, you can run:
bashmake test-<OS>_<JDK_VERSION>
That would give for JDK 11 on Alpine Linux:
bashmake test-alpine_jdk11
make targetsshow gives us a detailed view of the images that will be built, with the tags, platforms, and Dockerfiles.
bashmake 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.
bashmake bats make: 'bats' is up to date.
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.
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
MacOS OrbStack 容器配置
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
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 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务