mkdir jenkins_home
chown -R 1000:1000 /root/jenkins_home/
docker run -d --name myjenkins -v /root/jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 --restart=on-failure jenkins/jenkins:lts-jdk17
参考
- Official Jenkins Docker image
- Docker 搭建 Jenkins 实现自动部署