拉取鏡像
docker pull jenkins/jenkins
新建文件夾掛載
mkdir jenkins_home
運(yùn)行
docker run \
-u 0 \
-d \
-p 8080:8080 \
-p 50000:50000 \
-e TZ="Asia/Shanghai" \
-v jenkins_home:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(which docker):/usr/bin/docker \
--name jenkins \
jenkins/jenkins