Last active
February 15, 2016 16:33
-
-
Save Vad1mo/53eb8850d27b5e3d5c97 to your computer and use it in GitHub Desktop.
Docker Buildfile for custom Jenkins slave.
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
# 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 <[email protected]> | |
# 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