Jenkins with docker
Find a file
2026-03-06 18:09:27 +03:00
.gitignore Initial commit 2024-05-13 00:30:21 +03:00
build-push.sh #upgrade-jenkins-version 2026-03-06 18:09:27 +03:00
Dockerfile Update Dockerfile 2024-05-13 03:45:07 +03:00
LICENSE Initial commit 2024-05-13 00:12:52 +03:00
README.md Initial commit 2024-05-13 00:30:21 +03:00

Jenkins with Docker

Build

docker build -t jenkins-with-docker .

Create volume

docker volume create --name jenkins_home

Run

# From local image
docker run -d --privileged -p 8080:8080 -p 50000:50000 --name jenkins --restart=on-failure -v jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock jenkins-with-docker
# From Docker Hub
docker run -d --privileged -p 8080:8080 -p 50000:50000 --name jenkins --restart=on-failure -v jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock mewebstudio/jenkins-with-docker:latest

Unlock Jenkins

docker exec -it jenkins bash -c "cat /var/jenkins_home/secrets/initialAdminPassword"

Open Jenkins UI

http://localhost:8080