Last active
February 17, 2017 08:15
-
-
Save pkozlovskiy/f680e8f0003216a49fb1d28af395b066 to your computer and use it in GitHub Desktop.
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 | |
MAINTAINER Pavel Kozlovskiy <[email protected]> | |
# Install build tools | |
USER root | |
RUN mkdir /var/log/jenkins | |
RUN chown -R jenkins:jenkins /var/log/jenkins | |
RUN mkdir /var/cache/jenkins | |
RUN chown -R jenkins:jenkins /var/cache/jenkins | |
RUN apt-get update && apt-get install -y \ | |
apt-transport-https ca-certificates \ | |
&& apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D \ | |
&& echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list \ | |
&& apt-get update \ | |
&& apt-get install -y docker-engine \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers | |
#RUN echo "Defaults env_keep+="DEB_* DIST ARCH"" >> /etc/sudoers.d/jenkins | |
RUN usermod -aG docker jenkins | |
USER jenkins | |
RUN install-plugins.sh \ | |
... |
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
version: "3" | |
services: | |
jenkins: | |
container_name: jenkins | |
restart: always | |
build: . | |
ports: | |
- "50000:50000" | |
- "8080:8080" | |
volumes: | |
- c:/docker/jenkins:/var/jenkins_home | |
- c:/docker/jenkins:/var/log/jenkins | |
- /var/run/docker.sock:/var/run/docker.sock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment