docker pull jenkins/jenkins:alpineÄocker run -d -u root -name jenkins -p 8080:8080 -v /Users/rmatharoo/jenkins/jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock jenkins/jenkins:alpine Lets install the alpine version of jenkins and attach it a directory which will be acting as volume, so that we do not loose the settings in case the container is shutdown or restarted. Setting up jenkins as a container is better than setting it on our host as a separate installation than docker. After this is installed we should have a docker running on what we call the host machine. Installing docker is very easy, just follow the instructions on docker site and install the compatible version with your operating system. Configuration - connecting everything together. Installing jenkins plugin used as Docker agent for building and launching docker containers.Installing Jenkins image and running Jenkins CI on docker container.Docker running on host machine (i have docker v19.03.5 running on my Macbook).Here are the main components of this tutorial: The post assumes we have a working project with Dockerfile sitting on git. This post covers how jenkins can be used to build docker images. It can be customized with many plugins and made to do unit testing, running build scripts, automation of deployments and much more. It can help you build your CI pipeline in minutes. Jenkins is swiss army knife of CI tools out there and the best part its free and open source.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |