Detailed explanation of docker image instance built by Jenkins

Detailed explanation of docker image instance built by Jenkins

Preface: Jenkins has a docker image, and we said earlier that Jenkins is used to package the docker image. Can Jenkins' docker image be used to package the docker image?

Environmental Science:

CentOS 7 Docker 1.10. three

1. The docker environment is installed locally and the TCP access interface is configured

Modify execstart to:

2. Pull and run Jenkins' docker image

3. Install plug-in: cloudbees docker build and publish plug-in

4. Configure the docker inside the Jenkins image. Here we directly use the binary compiled version of docker:

5. Create Apache project, select git for source code management, and the URL is: https://git.coding.net/lightingLYG/apache.git

Add the build step, select "docker build and publish", fill in the name, and the docker host URI is TCP: / / host: 2375

Then click Advanced and select skip push

After saving, you can build. The operation of pushing to the server is skipped here

6. Go to the host to check whether the image is packaged

Thank you for reading, hope to help you, thank you for your support to this site!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>