Skip to content

Instantly share code, notes, and snippets.

@twasink
Last active February 1, 2018 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save twasink/79b0993eb5ce0ea5df027c557be5d067 to your computer and use it in GitHub Desktop.
Save twasink/79b0993eb5ce0ea5df027c557be5d067 to your computer and use it in GitHub Desktop.
Dockerfile for a Jenkins data volume container
# Needs to match the linux version used in jenkins-master
FROM debian:jessie
MAINTAINER Robert Watkins
# user 1000 must match the user id for the jenkins user in jenkins-master
RUN useradd -d "/var/jenkins_home" -u 1000 -m -s /bin/bash jenkins
RUN mkdir -p /var/log/jenkins
RUN chown -R jenkins:jenkins /var/log/jenkins
VOLUME ["/var/log/jenkins", "/var/jenkins_home"]
USER jenkins
CMD ["echo", "Data container for Jenkins"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment