目录
参考资料:https://www.jenkins.io/doc/book/installing/docker/#downloading-and-running-jenkins-in-docker
1.Open up a terminal window.(打开一个终端窗口。)
1.安装Jenkins
参考资料:https://www.jenkins.io/doc/book/installing/docker/#downloading-and-running-jenkins-in-docker
1.Open up a terminal window.(打开一个终端窗口。)
2.Create a bridge network in Docker using the following docker network create command:(使用以下Docker network Create命令在Docker中创建桥接网络)
docker network create jenkins
3.In order to execute Docker commands inside Jenkins nodes, download and run the docker:dind Docker image using the following docker run command:(为了在Jenkins节点内执行Docker命令,请使用以下dockerrun命令下载并运行Docker:dind-Docker映像)
docker run \
--name jenkins-docker \
--rm \
--detach \
--privileged \
--network jenkins \
--network-alias docker \
--env DOCKER_TLS_CERTDIR=/certs \
--volume jenkins-docker-certs:/certs/client \
--volume jenkins-data:/var/jenkins_home \
--publish 2376:2376 \
docker:dind \
--storage-driver overlay2
If you have problems copying and pasting the above command snippet, use the annotation-free version below:(如果您在复制和粘贴上面的命令片段时遇到问题, 请使用下面的无注释版本)
doc