Skip to content

Instantly share code, notes, and snippets.

@benton
Created February 9, 2016 19:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benton/0b0c8601585d7e30861b to your computer and use it in GitHub Desktop.
Save benton/0b0c8601585d7e30861b to your computer and use it in GitHub Desktop.
Docker-enabled Jenkins image
FROM jenkins:1.642.1
USER root
# install docker
RUN wget -qO- https://get.docker.com/gpg | apt-key add -
RUN wget -qO- https://get.docker.com/ | sh
RUN usermod -aG docker jenkins && usermod -aG users jenkins
USER jenkins
@benton
Copy link
Author

benton commented Feb 9, 2016

Build: docker build --tag=dtest .
Run docker run --rm -it --entrypoint=docker -v /var/run/docker.sock:/var/run/docker.sock dtest version
Output:

Client:
 Version:      1.10.0
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   590d5108
 Built:        Thu Feb  4 18:16:19 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.0
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   590d5108
 Built:        Thu Feb  4 18:41:30 2016
 OS/Arch:      linux/amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment