You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/jenkins/dind-jenkins/README.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,28 @@
2
2
3
3
Note that by default each of the example docker compose configurations will create their own volumes for the data. This might not be what you want. In order to use the same volumes for every docker compose configuration, run docker compose with `-p` (or `--project-name`) option. This can also be done by setting `COMPOSE_PROJECT_NAME` environment variable:
4
4
5
-
```bash
5
+
```sh
6
6
export COMPOSE_PROJECT_NAME=jenkins
7
7
```
8
8
9
9
## Jenkins image with Docker-in-Docker support
10
10
11
-
In order to run Jenkins container with Docker-in-Docker support, `cd` into [dind-jenkins](./dind-jenkins/) directory and run `docker compose up`. See Dockerfile and docker compose.yml for the configuration details.
11
+
To be able run Docker commands from inside the Jenkins container, we will need to install the Docker client. This can be done with a suitable Dockerfile:
12
12
13
-
```bash
14
-
cd dind-jenkins/
13
+
```Dockerfile title="Dockerfile"
14
+
--8<-- "examples/jenkins/dind-jenkins/Dockerfile"
15
+
```
16
+
17
+
When running this container, we will want to define ports and volumes. To do this, we will use a `docker-compose.yml` configuration:
These files are available in the repository that provides this website. In order to run Jenkins container with Docker-in-Docker support, `cd` into `examples/jenkins/dind-jenkins` directory and run `docker compose up`.
24
+
25
+
```sh
26
+
cd examples/jenkins/dind-jenkins
15
27
16
28
# If you want to see logs in the current terminal
17
29
docker compose up --build
@@ -22,8 +34,8 @@ docker compose up --build --detach
22
34
23
35
The initial admin password can be easily printed with `docker compose exec`:
In order to get started the suggested plugins are often good a starting point. If you are planning to create pipeline projects with stages running in on-demand Docker containers, you will also need [Docker Pipeline](https://plugins.jenkins.io/docker-workflow/) plugin. This can be installed through the [Manage Jenkins > Manage plugins](http://localhost:8080/pluginManager/available) menu.
41
+
In order to get started with Jenkins, the suggested plugins are often good a starting point. If you are planning to create pipeline projects with stages running in on-demand Docker containers, you will also need [Docker Pipeline](https://plugins.jenkins.io/docker-workflow/) plugin. This can be installed through the [Manage Jenkins > Manage plugins](http://localhost:8080/pluginManager/available) menu.
0 commit comments