Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

steps to add host daemon in official jenkins image #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ docker build -t myjenkins-blueocean:2.414.2 .
#IF you are having problems building the image yourself, you can pull from my registry (It is version 2.332.3-1 though, the original from the video)

docker pull devopsjourney1/jenkins-blueocean:2.332.3-1 && docker tag devopsjourney1/jenkins-blueocean:2.332.3-1 myjenkins-blueocean:2.332.3-1

```

## Create the network 'jenkins'
Expand All @@ -19,6 +20,8 @@ docker network create jenkins
```

## Run the Container


### MacOS / Linux
```
docker run --name jenkins-blueocean --restart=on-failure --detach \
Expand All @@ -41,6 +44,30 @@ docker run --name jenkins-blueocean --restart=on-failure --detach `
```


## Alternatively, run official Jenkins BLueOcean Docker image with host docker daemon (no need to build image)
### Linux
```
docker run --name my-jenkins-blueocean --restart=on-failure --detach \
--network jenkins --env DOCKER_HOST=unix:///var/run/docker.sock \
--publish 8080:8080 --publish 50000:50000 \
--volume jenkins-data:/var/jenkins_home \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume jenkins-docker-certs:/certs/client:ro
myjenkins-blueocean:2.452.1-1
```

## Enter the shell of the container as root user
```
docker exec -it -u 0 my-jenkins-blueocean bin/bash
```


## Get the Docker CLI running the command in contaiiner shell
```
apt-get install -y docker.io
```


## Get the Password
```
docker exec jenkins-blueocean cat /var/jenkins_home/secrets/initialAdminPassword
Expand Down