In this tutorial, Quick start with jenkins in docker. Jenkins is a automation CI/CD tool. with jenkins, you can create jobs to build, test and deploy your application. Docker the essential for DevOps Roles.
Docker compose for Jenkins
You can create “jenkins-docker-compose.yml” file for Jenkins
version: '2' services: jenkins: image: 'jenkins:2.60.3' container_name: jenkins user: root restart: always ports: - '8080:8080' - '50000:50000' volumes: - /home/huupv/data/jenkins:/var/jenkins_home - /var/run/docker.sock:/var/run/docker.sock
- docker.sock with Host in the volume. But be careful, you can delete the container from Docker.
- “/var/jenkins_home” is a place to read docker images. so do not change. If Docker has died, then your data remains and restore if you start it again.
Starting Jenkins with docker
Execute this command as below
docker-compose -f jenkins-docker-compose.yml up
From local, you can access Jenkins at browser at http://0.0.0.0:8080
Thought the article, You can “Set up jenkins with docker“ as above . I hope will this your helpful.