Skip to content

Commit beefdb1

Browse files
authored
Do not use docker-in-docker term when mounting docker socket from host (#17)
1 parent baf195e commit beefdb1

File tree

9 files changed

+16
-14
lines changed

9 files changed

+16
-14
lines changed

docs/examples/jenkins/ansible-kubernetes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ You will need a running Kubernetes cluster, that supports services with `LoadBal
88

99
## Preparing the Jenkins instance
1010

11-
The pipeline provided by this example can be added to any Jenkins instance you have administrator access and can run pipeline stages with docker agent. For example, Jenkins configuration from [Docker-in-Docker](../dind-jenkins/) example can be used.
11+
The pipeline provided by this example can be added to any Jenkins instance you have administrator access and can run pipeline stages with docker agent. For example, Jenkins configuration from [Jenkins with access to hosts Docker engine](../jenkins-host-docker/) example can be used.
1212

1313
We will use secret file to configure credentials for managing the target Kubernetes cluster. To create the secret file credential, open _Global credentials_ from _Jenkins_ credentials store from [Manage Jenkins > Manage Credentials](http://localhost:8080/credentials/) and click _Add Credentials_ from the left side menu.
1414

docs/examples/jenkins/build-status-pipelines/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This example contains pipelines to produce builds with success, unstable, failed
44

55
## Preparing the Jenkins instance
66

7-
The pipeline provided by this example can be added to any Jenkins instance you have administrator access. For example, Jenkins configuration from [Docker-in-Docker](../dind-jenkins/) example can be used.
7+
The pipeline provided by this example can be added to any Jenkins instance you have administrator access. For example, Jenkins configuration from [Jenkins with access to hosts Docker engine](../jenkins-host-docker/) example can be used.
88

99
In order to be able to run the seed project we will need [Job DSL](https://plugins.jenkins.io/job-dsl/) plugin. Install the plugin through Available tab in [Manage Jenkins > Manage Plugins](http://localhost:8080/pluginManager/available).
1010

docs/examples/jenkins/dind-jenkins/README.md renamed to docs/examples/jenkins/jenkins-host-docker/README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1-
# Jenkins with hosts Docker socket
1+
# Jenkins with access to hosts Docker engine
22

33
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:
44

55
```sh
66
export COMPOSE_PROJECT_NAME=jenkins
77
```
88

9-
## Jenkins image with Docker-in-Docker support
9+
## Jenkins image with Docker client
1010

1111
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:
1212

1313
```Dockerfile title="Dockerfile"
14-
--8<-- "docs/examples/jenkins/dind-jenkins/Dockerfile"
14+
--8<-- "docs/examples/jenkins/jenkins-host-docker/Dockerfile"
1515
```
1616

17-
When running this container, we will want to define ports and volumes. To do this, we will use a `docker-compose.yml` configuration:
17+
## Jenkins container with access to hosts Docker engine
18+
19+
When running Jenkins in a container, we will want to define ports and volumes. To do this, we will use a `docker-compose.yml` configuration:
1820

1921
```yaml title="docker-compose.yml"
20-
--8<-- "docs/examples/jenkins/dind-jenkins/docker-compose.yml"
22+
--8<-- "docs/examples/jenkins/jenkins-host-docker/docker-compose.yml"
2123
```
2224

23-
These files are available in the repository that provides this website. In order to run Jenkins container with Docker-in-Docker support, `cd` into `docs/examples/jenkins/dind-jenkins` directory and run `docker compose up`.
25+
These files are available in the repository that provides this website. In order to run Jenkins container with Docker-in-Docker support, `cd` into `docs/examples/jenkins/jenkins-host-docker` directory and run `docker compose up`.
2426

2527
```sh
26-
cd docs/examples/jenkins/dind-jenkins
28+
cd docs/examples/jenkins/jenkins-host-docker
2729

2830
# If you want to see logs in the current terminal
2931
docker compose up --build

docs/examples/jenkins/parallel-robot-pipeline/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This directory provides an example of a Jenkins pipeline that executes Robot Fra
44

55
## Preparing the Jenkins instance
66

7-
The pipeline provided by this example can be added to any Jenkins instance you have administrator access and can run pipeline stages with docker agent. For example, Jenkins configuration from [Docker-in-Docker](../dind-jenkins/) example can be used.
7+
The pipeline provided by this example can be added to any Jenkins instance you have administrator access and can run pipeline stages with docker agent. For example, Jenkins configuration from [Jenkins with access to hosts Docker engine](../jenkins-host-docker/) example can be used.
88

99
In order to be able to run the pipeline we will need [Docker Pipeline](https://plugins.jenkins.io/docker-workflow/) and [Robot Framework](https://plugins.jenkins.io/robot/) plugins. Install these plugins through _Available_ tab in [Manage Jenkins > Manage Plugins](http://localhost:8080/pluginManager/available) and restart the Jenkins instance after these plugins have been installed. The restart can be done, for example, from the plugins page or by restarting the container with `docker compose down` and `docker compose up`.
1010

docs/examples/jenkins/sonarqube-jenkins/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Jenkins and SonarQube
22

3-
This example uses the same Jenkins configuration as the [Docker-in-Docker](../dind-jenkins/) example. If you did any configuration in [dind-jenkins](../dind-jenkins/) directory, sync the project names with `-p`/`--project-name` option or `COMPOSE_PROJECT_NAME` environment variable to use the same volumes. For example:
3+
This example uses the same Jenkins configuration as the [Jenkins with access to hosts Docker engine](../jenkins-host-docker/) example. If you did any configuration in [jenkins-host-docker](../jenkins-host-docker/) directory, sync the project names with `-p`/`--project-name` option or `COMPOSE_PROJECT_NAME` environment variable to use the same volumes. For example:
44

55
```sh
6-
# Replace jenkins with dind-jenkins, if you used default project name in dind-jenkins directory.
6+
# Replace jenkins with jenkins-host-docker, if you used default project name in jenkins-host-docker directory.
77

88
# With -p/--project-name argument:
99
docker compose -p jenkins up -d

docs/examples/jenkins/sonarqube-jenkins/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: "3"
22
services:
33
jenkins:
4-
build: ../dind-jenkins/
4+
build: ../jenkins-host-docker/
55
ports:
66
# Web user interface
77
- 8080:8080

mkdocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ nav:
1313
- Docker:
1414
- ./examples/docker/docker-on-wsl/README.md
1515
- Jenkins:
16-
- ./examples/jenkins/dind-jenkins/README.md
16+
- ./examples/jenkins/jenkins-host-docker/README.md
1717
- ./examples/jenkins/ansible-kubernetes/README.md
1818
- ./examples/jenkins/build-status-pipelines/README.md
1919
- ./examples/jenkins/parallel-robot-pipeline/README.md

0 commit comments

Comments
 (0)