richardzone / docker-jenkins-with-docker-cli

Dockerized Jenkins with docker cli support to launch Dockerized Jenkins slaves

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dockerized Jenkins with Docker support

This docker image contains Jenkins 2.46.1 with built-in docker cli inside the image, so that you can use docker related commands in Jenkins builds (e.g. to launch new containers), or you can use plugins like Docker Slaves Plugin

How to use this

Use the below command to start Jenkins container:

docker run --name myjenkins -p 8080:8080 -p 50000:50000 -v /var/run/docker.sock:/var/run/docker.sock -v /var/jenkins_home jenkins

Note that in above command we expose the Docker socket in host machine to the Jenkins CI container, so that it could launch sibling containers. For more info, please see here.

License

WTFPL

About

Dockerized Jenkins with docker cli support to launch Dockerized Jenkins slaves