33# - AWS CLI
44# - kubectl
55# - sonar-scanner
6- # - Java 8 JDK (from base image)
7- # - SBT (from base image)
6+ # - SBT (overwrites base image with newer version )
7+ # - Java 11.0.X JDK (from base image)
88# - Docker (from base image)
99
1010# Pull base image (https://circleci.com/docs/2.0/circleci-images/#openjdk)
1111# https://github.com/CircleCI-Public/circleci-dockerfiles/blob/master/openjdk/images/8u232-jdk/Dockerfile
12- FROM circleci/openjdk:11.0.5 -jdk-stretch
12+ FROM circleci/openjdk:11-jdk-stretch
1313
1414# Environment variables
1515ENV SCALA_VERSION=2.13.1
16- ENV KUBECTL_VERSION=v1.16.1
16+ ENV SBT_VERSION=1.3.3
1717ENV SONAR_SCANNER_VERSION=3.3.0.1492
1818ENV SONAR_SCANNER_PACKAGE=sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip
1919
2020USER root
2121
2222SHELL ["/bin/bash" , "-eo" , "pipefail" , "-x" , "-c" ]
2323
24+ # Fix apt-get
25+ RUN apt-get update && apt-get install -y apt-transport-https
26+
2427# Install current SBT
25- RUN apt-get update && apt-get install apt-transport-https
2628RUN echo "deb https://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list
2729RUN curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add
2830RUN apt-get update && apt-get install sbt
29- RUN mkdir project && echo "sbt.version=1.3.3" > project/build.properties && echo " scalaVersion := \" 2.13.1 \" " > build.sbt
30- RUN sbt sbtVersion
31+ RUN echo "scalaVersion := \" $SCALA_VERSION \" " > build.sbt
32+ RUN sbt sbtVersion scalaVersion -Dsbt.version=$SBT_VERSION
3133
3234# Install the AWS CLI
3335RUN curl -sSL https://s3.amazonaws.com/aws-cli/awscli-bundle.zip -o awscli-bundle.zip && \
@@ -38,10 +40,10 @@ RUN curl -sSL https://s3.amazonaws.com/aws-cli/awscli-bundle.zip -o awscli-bundl
3840 /usr/local/bin/aws --version
3941
4042# Install kubectl
41- RUN curl -LO https://storage.googleapis. com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl && \
42- mv kubectl /usr/local/bin/kubectl && \
43- chmod +x /usr/local/bin/kubectl && \
44- kubectl version --client
43+ RUN curl -s https://packages.cloud.google. com/apt/doc/apt-key.gpg | sudo apt-key add -
44+ RUN echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
45+ RUN apt-get update && apt-get install -y kubectl
46+ RUN kubectl version --client
4547
4648# Install Sonar-Scanner
4749RUN curl -LO https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/$SONAR_SCANNER_PACKAGE && \
@@ -56,4 +58,4 @@ USER circleci
5658# Define working directory
5759WORKDIR /home/circleci
5860
59- RUN echo -e "Tag for this image:\n 11.0.5 -${SCALA_VERSION}-${KUBECTL_VERSION }"
61+ RUN echo -e "Tag for this image:\n java11 -${SCALA_VERSION}-${SBT_VERSION }"
0 commit comments