2015.9.6 / k16wire
-v /var/run/docker.sock:/var/run/docker.sock
-v /usr/bin/docker:/usr/bin/docker
$ docker run -privileged xxx
FROM jenkins:latest
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
$ docker run -d -P \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /usr/bin/docker:/usr/bin/docker \
jenkins-master
FROM ubuntu:trusty
MAINTAINER Ervin Varga <ervin.varga@gmail.com>
# Make sure the package repository is up to date.
RUN apt-get update
RUN apt-get -y upgrade
# Install a basic SSH server
RUN apt-get install -y openssh-server
RUN sed -i 's|session required pam_loginuid.so|session optional pam_loginuid.so|g' /etc/pam.d/sshd
RUN mkdir -p /var/run/sshd
# Install JDK 7 (latest edition)
RUN apt-get install -y openjdk-7-jdk
# Add user jenkins to the image
RUN adduser --quiet jenkins
# Set password for the jenkins user (you may want to alter this).
RUN echo "jenkins:jenkins" | chpasswd
# Standard SSH port
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]