配置 Docker in Docker 的Jenkins
选择Jenkins镜像
找到相应镜像
https://hub.docker.com/r/jenkins/jenkins
拉取最新jenkins
docker pull jenkins/jenkins:latest
创建 volume
docker volume create jenkins_home
直接通过 docker 命令启动
docker run -p 8080:8080 -p 50000:50000
-v jenkins_home:/var/jenkins_home
-v /var/run/docker.sock:/var/run/docker.sock
-v /usr/bin/docker:/usr/bin/docker
--name jenkins --privileged=true -u root jenkins/jenkins:latest