https://github.com/mewebstudio/jenkins-with-docker
Jenkins with docker
https://github.com/mewebstudio/jenkins-with-docker
devops docker docker-in-docker jenkins jenkins-with-docker
Last synced: about 2 months ago
JSON representation
Jenkins with docker
- Host: GitHub
- URL: https://github.com/mewebstudio/jenkins-with-docker
- Owner: mewebstudio
- License: mit
- Created: 2024-05-12T21:12:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-01T20:54:17.000Z (about 1 year ago)
- Last Synced: 2025-05-01T21:48:26.618Z (about 1 year ago)
- Topics: devops, docker, docker-in-docker, jenkins, jenkins-with-docker
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Jenkins with Docker
### Build
```bash
docker build -t jenkins-with-docker .
```
### Create volume
```bash
docker volume create --name jenkins_home
```
### Run
```bash
# 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
```
```bash
# 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
```bash
docker exec -it jenkins bash -c "cat /var/jenkins_home/secrets/initialAdminPassword"
```
### Open Jenkins UI
[http://localhost:8080](http://localhost:8080)