Created
June 20, 2018 09:20
-
-
Save timhberry/a8afcf2d06ed0cd0ece0c5bfb109b635 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/slave | |
USER root | |
# Install docker | |
ENV DOCKER_VERSION 18.03.1-ce | |
RUN set -x \ | |
&& curl -fSL "https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz" -o docker.tgz \ | |
&& tar -xzvf docker.tgz \ | |
&& mv docker/* /usr/local/bin/ \ | |
&& rmdir docker \ | |
&& rm docker.tgz \ | |
&& docker -v | |
# Install kubectl | |
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl \ | |
&& chmod +x ./kubectl \ | |
&& mv ./kubectl /usr/local/bin/kubectl | |
# Install Terraform | |
RUN curl -LO https://releases.hashicorp.com/terraform/0.11.7/terraform_0.11.7_linux_amd64.zip \ | |
&& unzip terraform_0.11.7_linux_amd64.zip \ | |
&& rm terraform_0.11.7_linux_amd64.zip \ | |
&& chmod +x ./terraform \ | |
&& mv terraform /usr/local/bin/terraform | |
# Install gcloud SDK | |
RUN curl -sSL https://sdk.cloud.google.com | bash | |
RUN mv /home/jenkins/google-cloud-sdk /usr/local/google-cloud-sdk | |
# Configure runtime | |
COPY docker-entrypoint.sh /usr/local/bin/ | |
COPY jenkins-slave /usr/local/bin/jenkins-slave | |
RUN chmod +x /usr/local/bin/docker-entrypoint.sh | |
RUN chmod +x /usr/local/bin/jenkins-slave | |
ENV PATH="/usr/local/google-cloud-sdk/bin:$PATH" | |
ENTRYPOINT docker-entrypoint.sh; jenkins-slave |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment