Skip to content

Instantly share code, notes, and snippets.

@briandant
Created August 18, 2017 21:11
Show Gist options
  • Save briandant/b971752c495c6b6e0ca7422ffa912abf to your computer and use it in GitHub Desktop.
Save briandant/b971752c495c6b6e0ca7422ffa912abf to your computer and use it in GitHub Desktop.
FROM openjdk:jre-slim
MAINTAINER Nick Woebcke <[email protected]>
# Arguments passed in
ARG FTP_PATH
ARG KIT_DIR
ENV TERRAFORM_VER="0.9.4"
ENV DOCKER_VERSION="17.03.1-ce"
# Get basic dependencies
RUN apk add --no-cache wget \
&& rm -rf /var/cache/apk/*
# Get IPD files.
RUN wget ${FTP_PATH}\
&& mkdir IPDTool \
&& tar zxf ${KIT_DIR}.tar.gz -C IPDTool \
&& rm ${KIT_DIR}.tar.gz
# Install Docker (client mode)
RUN wget --no-check-certificate https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz \
&& chmod +x docker-${DOCKER_VERSION}.tgz \
&& tar zxf docker-${DOCKER_VERSION}.tgz \
&& mv docker/* usr/local/bin/ \
&& rm docker-${DOCKER_VERSION}.tgz \
&& rm -r docker
# Get Terraform
RUN wget --no-check-certificate https://releases.hashicorp.com/terraform/${TERRAFORM_VER}/terraform_${TERRAFORM_VER}_linux_amd64.zip \
&& unzip terraform_${TERRAFORM_VER}_linux_amd64.zip -d /usr/local/bin \
&& rm terraform_${TERRAFORM_VER}_linux_amd64.zip
COPY Terraform /IPDTool/etc/Terraform
COPY toHost /IPDTool/etc/toHost
COPY util /IPDTool/bin/
COPY Samples /Samples
COPY startISCAgent.sh /IPDTool/etc/toHost
# Set environment variables -- the ugly way because Alpine misbehaves
# and need to access 'terraform' in its new home
ENV PATH="$PATH:/IPDTool/bin"
CMD ntpd -dp pool.ntp.org;/bin/sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment