Created
August 18, 2017 23:10
-
-
Save briandant/8b2edd6e6c89355908cc228d8569ca2e to your computer and use it in GitHub Desktop.
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 debian:jessie | |
MAINTAINER Stuart Peters <[email protected]> | |
# Arguments passed in | |
ARG FTP_FILE=ftp://kitserver/kits/unreleased_ftp/IPDTool/2018.1.0/2018.1.0.245.0/IPDTool-2018.1.0.245.0-unix.tar.gz | |
ARG KIT_DIR=IPDTool-2018.1.0.245.0-unix | |
ENV TERRAFORM_VER="0.9.4" | |
ENV DOCKER_VERSION="17.03.1-ce" | |
ENV INT_F_NAME IPDTool-2018.1.0.245.0-unix.tar.gz | |
#install Java | |
RUN set -ex && \ | |
echo 'deb http://deb.debian.org/debian jessie-backports main' \ | |
> /etc/apt/sources.list.d/jessie-backports.list && \ | |
apt update -y && \ | |
apt install -t \ | |
jessie-backports \ | |
openjdk-8-jre-headless \ | |
ca-certificates-java -y | |
# Get basic dependencies | |
RUN apt-get update && apt-get -y dist-upgrade | |
RUN apt-get install -y golang git curl wget unzip | |
# Get IPD files. | |
RUN mkdir IPDTool \ | |
&& curl -O ${FTP_FILE} \ | |
&& tar zxf ${INT_F_NAME} -C IPDTool \ | |
&& rm -rf ${INT_F_NAME} | |
# 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 | |
RUN 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 | |
ENV GOPATH /usr/go | |
RUN mkdir $GOPATH | |
ENV PATH $GOPATH/bin:$PATH | |
# RUN go get github.com/yudai/gotty | |
RUN mkdir /gotty | |
WORKDIR /gotty | |
RUN curl -L https://github.com/yudai/gotty/releases/download/v1.0.1/gotty_linux_amd64.tar.gz | tar xz | |
# Install whatever program you want to run through gotty: | |
# RUN apt-get install -y bsdgames | |
# ENV PATH /usr/games/:$PATH | |
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre | |
ADD license/ShardMaster/cache.key /Samples/license/ShardMaster/ | |
ADD license/Standard/cache.key /Samples/license/Standard/ | |
RUN cd /bin/ && ln -s /IPDTool/bin/ipd icm && ln -s /IPDTool/bin/keygenSSH.sh keygenSSH.sh && ln -s /IPDTool/bin/keygenTLS.sh keygenTLS.sh | |
#ICM Google Cloud Platform | |
RUN mkdir -p /GCP/credentials | |
ADD GS-ICMEx-learner-limited.json /GCP/credentials/ | |
ENTRYPOINT ["/gotty/gotty"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment