jenkins/agent![Join the chat at []]([] . This executable is an instance of the Jenkins Remoting library. Java version depends on the image and the platform, see the Configurations section below.
This image is used as the basis for the Docker Inbound Agent image. In that image, the container is launched externally and attaches to Jenkins.
This image may instead be used to launch an agent using the Launch method of Launch agent via execution of command on the controller. For example on Linux you can try
shdocker run -i --rm --name agent --init jenkins/agent java -jar /usr/share/jenkins/agent.jar
after setting Remote root directory to /home/jenkins/agent.
or if using Windows Containers
powershelldocker run -i --rm --name agent --init jenkins/agent:jdk17-windowsservercore-ltsc2019 java -jar C:/ProgramData/Jenkins/agent.jar
after setting Remote root directory to C:\Users\jenkins\Agent.
Starting from Remoting 3.8 there is a support of Work directories, which provides logging by default and change the JAR Caching behavior.
Call example for Linux:
shdocker run -i --rm --name agent1 --init -v agent1-workdir:/home/jenkins/agent jenkins/agent java -jar /usr/share/jenkins/agent.jar -workDir /home/jenkins/agent
Call example for Windows Containers:
powershelldocker run -i --rm --name agent1 --init -v agent1-workdir:C:/Users/jenkins/Work jenkins/agent:jdk17-windowsservercore-ltsc2019 java -jar C:/ProgramData/Jenkins/agent.jar -workDir C:/Users/jenkins/Work
The image has several supported configurations, which can be accessed via the lists of tags that can be consulted at [***]
The file docker-bake.hcl defines all the configuration for Linux images and their associated tags.
There are also versioned tags in DockerHub, and they are recommended for production use. See the full list at [***]
By default, the image is using the Etc/UTC timezone.
If you want to use the timezone of your machine, you can mount the /etc/localtime file from the host (as per this comment) and the /etc/timezone from the host too.
bashdocker run --rm --tty --interactive --entrypoint=date --volume=/etc/localtime:/etc/localtime:ro --volume=/etc/timezone:/etc/timezone:ro jenkins/agent Fri Nov 25 18:27:22 CET 2022
You can also set the TZ environment variable to the desired timezone.
TZ is a standard POSIX environment variable used by many images, see *** for a list of valid values.
The next command is run on a machine using the Europe/Paris timezone a few seconds after the previous one.
bashdocker run --rm --tty --interactive --env TZ=Asia/Shanghai --entrypoint=date jenkins/agent Sat Nov 26 01:27:58 CST 2022
jenkins/agent image as a base imageShould you want to adapt the jenkins/agent image to your local timezone while creating your own image based on it, you could use the following command (inspired by issue #291):
dockerfileFROM jenkins/agent as agent [...] ENV TZ=Asia/Shanghai [...] RUN ln -snf /usr/share/zoneinfo/"${TZ}" /etc/localtime && echo "${TZ}" > /etc/timezone \ && dpkg-reconfigure -f noninteractive tzdata \ [...]
See GitHub releases for versions 3.35-1 and above.
There is no changelog for previous versions, see the commit history.
Jenkins remoting changelogs are available at [***]

manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务