Created
November 21, 2015 15:15
-
-
Save patriksvensson/6401d97eda1e36edc7b2 to your computer and use it in GitHub Desktop.
Dockerfile for Jenkins build agent using Cake
This file contains hidden or 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 ubuntu:15.10 | |
MAINTAINER Patrik Svensson "[email protected]" | |
# Make sure everything is up to date. | |
RUN apt-get update | |
RUN apt-get -y upgrade | |
# Install SSH server. | |
RUN apt-get install -y openssh-server | |
RUN sed -i 's|session required pam_loginuid.so|session optional pam_loginuid.so|g' /etc/pam.d/sshd | |
RUN mkdir -p /var/run/sshd | |
# Install prereqs | |
RUN apt-get install -y openjdk-7-jdk | |
RUN apt-get install -y git-all | |
RUN apt-get install -y curl | |
RUN apt-get install -y unzip | |
# Install Mono | |
RUN curl -s http://download.mono-project.com/repo/xamarin.gpg | apt-key add - | |
RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list | |
RUN apt-get update && apt-get install -y mono-complete | |
# Create Jenkins user | |
RUN adduser --quiet jenkins | |
RUN echo "jenkins:jenkins" | chpasswd | |
# Install certificates | |
RUN mozroots --import --machine --sync --quiet | |
RUN yes | certmgr -ssl -m https://go.microsoft.com | |
RUN yes | certmgr -ssl -m https://nugetgallery.blob.core.windows.net | |
RUN yes | certmgr -ssl -m https://nuget.org | |
# Expose SSH port. | |
EXPOSE 22 | |
# Run SSH agent as daemon. | |
CMD ["/usr/sbin/sshd", "-D"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment