Skip to content

Instantly share code, notes, and snippets.

@Vad1mo
Last active February 15, 2016 16:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vad1mo/53eb8850d27b5e3d5c97 to your computer and use it in GitHub Desktop.
Save Vad1mo/53eb8850d27b5e3d5c97 to your computer and use it in GitHub Desktop.
Docker Buildfile for custom Jenkins slave.
# This Dockerfile is used to build an image containing basic stuff to be used as a Jenkins slave build node.
FROM java:8-jdk
MAINTAINER Vadim Bauer <hello@8gears.com>
# Install and configure a basic SSH server
RUN apt-get update &&\
apt-get install -y openssh-server &&\
apt-get clean -y && rm -rf /var/lib/apt/lists/* &&\
sed -i 's|session required pam_loginuid.so|session optional pam_loginuid.so|g' /etc/pam.d/sshd &&\
mkdir -p /var/run/sshd
# Install specific dependencies
# Set user jenkins to the image
RUN adduser --quiet jenkins &&\
echo "jenkins:jenkins" | chpasswd
# Standard SSH port
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment