Last active
July 20, 2016 15:07
-
-
Save nidin/dc91cb86f0a737bfbc6a0bd5c50c4f56 to your computer and use it in GitHub Desktop.
Mount Ubuntu Host Docker to Official Jenkins Container
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
FROM jenkins | |
USER root | |
RUN apt-get update \ | |
&& apt-get install -y sudo apt-transport-https ca-certificates \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN echo "www-data ALL=NOPASSWD: ALL" >> /etc/sudoers | |
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
RUN echo "deb https://apt.dockerproject.org/repo debian-jessie main" > /etc/apt/sources.list.d/docker.list | |
RUN apt-get update | |
RUN apt-get install -y docker-engine libsystemd-journal0 python-pip | |
RUN pip install docker-compose | |
RUN service docker start |
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
docker run --name jenkins -u www-data -p 8080:8080 -p 50000:50000 \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v /usr/app/jenkins:/var/jenkins_home \ | |
-v /var/www:/var/www \ | |
-d jenkins_docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment