mirror of
https://github.com/mewebstudio/jenkins-with-docker.git
synced 2026-04-26 09:55:58 +03:00
Jenkins with docker
| .gitignore | ||
| build-push.sh | ||
| Dockerfile | ||
| LICENSE | ||
| README.md | ||
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"