55# - AWS CLI
66# - Docker
77
8-
98# Pull base image
109FROM openjdk:8u222
1110
@@ -15,10 +14,18 @@ ENV SBT_VERSION=1.2.8
1514ENV KUBECTL_VERSION=v1.14.5
1615ENV HOME=/config
1716
17+ # Install some tools
18+ RUN \
19+ apt-get update && apt-get install -y --no-install-recommends \
20+ bash ca-certificates coreutils curl gawk git grep groff gzip \
21+ jq less python sed tar zip software-properties-common apt-transport-https && \
22+ apt-get clean && \
23+ rm -rf /var/lib/apt/lists/* && \
24+
1825# Install Scala
1926# # Piping curl directly in tar
2027ENV PATH="/root/scala-$SCALA_VERSION/bin:${PATH}"
21- SHELL ["/bin/bash" , "-o " , "pipefail" , "-x" , "-c" ]
28+ SHELL ["/bin/bash" , "-eo " , "pipefail" , "-x" , "-c" ]
2229RUN \
2330 curl -fsL https://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz | tar xfz - -C /root/ && \
2431 scala -version
@@ -30,20 +37,21 @@ RUN \
3037 rm sbt-$SBT_VERSION.deb && \
3138 apt-get update && \
3239 apt-get install -y --no-install-recommends sbt=${SBT_VERSION} && \
33- sbt sbtVersion && \
40+ export TEMP="$(mktemp -d)" && \
41+ cd "${TEMP}" && \
42+ echo "class Question { def answer = 42 }" > Question.scala && \
43+ sbt "set scalaVersion := \" ${SCALA_VERSION}\" " compile && \
44+ rm -r "${TEMP}" && \
3445 apt-get clean && \
3546 rm -rf /var/lib/apt/lists/*
3647
3748# Install the AWS CLI
38- RUN apt-get update && apt-get install -y --no-install-recommends \
39- bash ca-certificates coreutils curl gawk git grep groff gzip jq less python sed tar zip && \
40- curl -sSL https://s3.amazonaws.com/aws-cli/awscli-bundle.zip -o awscli-bundle.zip && \
41- unzip awscli-bundle.zip && \
42- apt-get clean && \
43- rm -rf /var/lib/apt/lists/* && \
44- ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws && \
45- rm awscli-bundle.zip && \
46- rm -Rf awscli-bundle
49+ RUN \
50+ curl -sSL https://s3.amazonaws.com/aws-cli/awscli-bundle.zip -o awscli-bundle.zip && \
51+ unzip awscli-bundle.zip && \
52+ ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws && \
53+ rm awscli-bundle.zip && \
54+ rm -Rf awscli-bundle
4755
4856# Install kubectl
4957# Note: Latest version may be found on:
6169
6270# Install Docker
6371RUN \
64- apt-get update && apt-get install -y --no-install-recommends software-properties-common apt-transport-https && \
6572 curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID" )/gpg | apt-key add - && \
6673 add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian stretch stable" && \
67- apt-get update && \
68- apt-get install -y --no-install-recommends docker-ce && \
74+ apt-get update && apt-get install -y --no-install-recommends docker-ce && \
6975 apt-get clean && \
7076 rm -rf /var/lib/apt/lists/*
7177
0 commit comments