Created
August 11, 2018 07:43
-
-
Save Rosaniline/b5ffc293888240159f83ec3e2caa0996 to your computer and use it in GitHub Desktop.
Jenkins with docker installed
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/jenkins:lts | |
USER root | |
RUN apt-get update | |
RUN apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg2 \ | |
software-properties-common | |
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - | |
RUN apt-key fingerprint 0EBFCD88 | |
RUN add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/debian \ | |
$(lsb_release -cs) \ | |
stable" | |
RUN apt-get update | |
RUN apt-get install -y docker-ce | |
USER ${user} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker build -t jenkins_docker . && docker run -d -v /var/run/docker.sock:/var/run/docker.sock -v jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 --name jenkins jenkins_docker