
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
This docker image is originally based on jenkins/inbound-agent and was replaced with the alpine image of https://hub.docker.com/r/odavid/jenkins-jnlp-slave in order to resolve the docker-in-docker requirement for more flexible CI agent deployments required to support docker and docker-compose calls in the qa environment.
To be able to use MQTT and to ease handling of json objects the mosquitto_clients and jq library are added.
To build the image manually:
docker build --no-cache -t jforge/jenkins-inbound-agent .
Use the jenkins-inbound-agent command line options or use corresponding environment variables.
The privileged mode (--privileged) is required and either the -e DIND=true flag
or the docker daemon socket mount (-v /var/run/docker.sock:/var/run/docker.sock).
For ease of use of docker inside jenkins build pipelines use the docker-in-docker feature by setting the flag DIND=true as an environment variable.
Refer to the jenkins master configuration for this agent node for the node label
and ensure that configuration uses /home/jenkins/agent as the remote root folder.
docker run --init --privileged \ -e JENKINS_URL=https://jenkins.example.org \ -e JENKINS_WEB_SOCKET=true \ -e JENKINS_SECRET=TheAgentSecret \ -e JENKINS_AGENT_NAME=MyInboundAgent \ -e DIND=true \ -e TINI_SUBREAPER=true \ jforge/jenkins-inbound-agent:latest
See the compose folder for a ready to use compose file.
Just create an .env file for it (or environment variables on the shell)
specifying the 3 required environment variables.
The say docker-compose up -d on the target host acting as a build node.
This composition uses the webSockets connection only (instead of JNLP-4):
version: '3.7' services: inbound-agent: image: jforge/jenkins-inbound-agent init: true privileged: true environment: - JENKINS_URL=${JENKINS_MASTER_URL} - JENKINS_SECRET=${JENKINS_AGENT_SECRET} - JENKINS_AGENT_NAME=${JENKINS_AGENT_NAME} - JENKINS_WEB_SOCKET=true - DIND=true - TINI_SUBREAPER=true
To use the image with the added feature prepare the Jenkins node on the master and start the node as described above.
In case of orphaned process the https://github.com/krallin/tini is responsible for removing them and performing signal forwarding. It runs transparently as a single child process (on a container).
Orphan processes consume resources, affect the process identifier namespace they run in and make the environment unstable or unusable, so that they should be removed.
By default, Tini needs to run using the process identifier (PID) 1 to remove
orphaned processes. If PID 1 cannot be used or if containers are run without
PID namespace isolation, the Tini program should be registered as a process
subreaper by setting the TINI_SUBREAPER environment variable to true.
This ensures the orphaned processes to be re-parented as children of the
Tini program which can then remove them to complete its execution.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务