How can I from my locally installed Jenkins run a docker build
on my Mac? Normally when I run docker build
I need to do it from the Docker Quickstart Terminal
but now I want to have Jenkins make the docker call. Clearly simply running docker build...
as an "Execute shell" component in Jenkins...
Must I run a separate Docker image with Jenkins which runs the docker build
command?
There is a Jenkins's plugin that help you to manage integration with Docker. https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin
I wrote this blogpost, maybe it's a little big over your question but I hope to be helpful http://gianarb.it/blog/docker-inside-docker-and-jenkins-2
The idea could be, just to start, install docker into the same Jenkins's server and build your project directly with a shell command, push this image inside a registry and you can use:
docker pull registry:username/imagename
to update your local image.. it's not a good practice build from Jenkins on your local machine. The concept is: Jenkins build and push your image and you will update that in your local/dev/prod environment.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.