Skip to content

Instantly share code, notes, and snippets.

@alexejsailer
Last active July 19, 2017 15:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexejsailer/671b18c26eb929e2c1bdf38daa23fe72 to your computer and use it in GitHub Desktop.
Save alexejsailer/671b18c26eb929e2c1bdf38daa23fe72 to your computer and use it in GitHub Desktop.
docker-jenkins Dockerfile and yml file for docker jenkins
jenkins:
build: .
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /usr/lib/x86_64-linux-gnu/libapparmor.so.1:/usr/lib/x86_64-linux-gnu/libapparmor.so.1
- /lib/x86_64-linux-gnu/libsystemd-journal.so.0:/lib/x86_64-linux-gnu/libsystemd-journal.so.0
- /lib/x86_64-linux-gnu/libcgmanager.so.0:/lib/x86_64-linux-gnu/libcgmanager.so.0
- /lib/x86_64-linux-gnu/libnih.so.1:/lib/x86_64-linux-gnu/libnih.so.1
- /lib/x86_64-linux-gnu/libnih-dbus.so.1:/lib/x86_64-linux-gnu/libnih-dbus.so.1
- /usr/bin/docker:/usr/bin/docker
ports:
- "8080:8080"
FROM jenkins:1.596
USER root
RUN apt-get update \
&& apt-get install -y sudo \
&& rm -rf /var/lib/apt/lists/*
RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers
USER jenkins
COPY plugins /usr/share/jenkins/plugins
RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins
scm-api:latest
git-client:latest
git:latest
greenballs:latest
docker-plugin:latest
@alexejsailer
Copy link
Author

For those who have problems to follow this article: http://container-solutions.com/running-docker-in-jenkins-in-docker/ sitting in front of Ubuntu 14.04

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