Jenkins adapted for running docker as a docker container
3.5K
This image is based on jenkinsci/blueocean and adds user jenkins to the docker group to allow it to run docker inside the container. It will use a default GID 999 for the docker group. To use a different GID you need to build a new image.
To run this image you need to define a home folder. By default the home folder provided in the project is used. To start jenkins with default settings run:
docker run -i -t --rm --name "jenkins" -v /var/run/docker.sock:/var/run/docker.sock -v $(PWD)/home:/var/jenkins_home -p "8080:8080" -p "50000:50000" stvfccn/jenkins
Replace $(PWD)/home with the path for jenkins home folder on the host machine
Use the following sample compose file to start this container in docker-compose:
version: '3.4'
services:
jenkins:
image: stvfccn/jenkins
restart: always
container_name: jenkins
privileged: true
ports:
- "8080:8080"
- "50000:50000"
volumes:
- ./home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
Content type
Image
Digest
Size
377.7 MB
Last updated
almost 5 years ago
docker pull stvfccn/jenkins