-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Thomas Kruse
committed
Sep 10, 2020
1 parent
48fdd4d
commit 70949bb
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
# Jenkins Docker Image including the docker client | ||
This docker image includes the docker command to enable Jenkins to interact with a docker daemon. | ||
|
||
It includes a build of docker-compose working on alpine as well. | ||
|
||
## Docker Socket integration | ||
|
||
If a bind-mount of the docker daemon socket is detected, appropriate permissions will be set to allow jenkins to access docker via the socket. | ||
In order for this to work the container must be run as `root`. | ||
To configure the uid to switch to the environment variable JENKINS_USER must be used instead `docker -u` | ||
To configure the uid to switch to, the environment variable JENKINS_USER must be used instead `docker -u` | ||
|
||
Example usage | ||
|
||
``` | ||
docker run -it -e JENKINS_USER=$(id -u) --rm -p 8080:8080 -p 50000:50000 \ | ||
-v $HOME/.jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock \ | ||
docker run -it --name=jenkins -e JENKINS_USER=$(id -u) --rm -p 8080:8080 -p 50000:50000 \ | ||
-v $HOME/.jenkins:/var/ -v /var/run/docker.sock:/var/run/docker.sock \ | ||
--name jenkins trion/jenkins-docker-client | ||
``` |