Skip to content
This repository was archived by the owner on Feb 25, 2022. It is now read-only.

Commit 886f76d

Browse files
committed
Fix java and sbt version
1 parent 76df20e commit 886f76d

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

Dockerfile

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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
12+
FROM circleci/openjdk:11.0.5-jdk-stretch
1313

1414
# Environment variables
1515
ENV SCALA_VERSION=2.13.1
@@ -21,19 +21,13 @@ USER root
2121

2222
SHELL ["/bin/bash", "-eo", "pipefail", "-x", "-c"]
2323

24-
# Install Scala
25-
RUN touch /usr/lib/jvm/java-8-openjdk-amd64/release && \
26-
curl -fsL https://downloads.typesafe.com/scala/$SCALA_VERSION/scala-$SCALA_VERSION.tgz | tar xfz - -C /opt/ && \
27-
ln -s /opt/scala-* /opt/scala && \
28-
/opt/scala/bin/scala -version
29-
30-
# Initialise SBT to download scala and the compiler-bridge
31-
RUN export TEMP="$(mktemp -d)" && \
32-
cd "${TEMP}" && \
33-
echo "class Question { def answer = 42 }" > Question.scala && \
34-
sbt "set scalaVersion := \"${SCALA_VERSION}\"" compile && \
35-
rm -r "${TEMP}"
36-
RUN sbt --version
24+
# Install current SBT
25+
RUN apt-get update && apt-get install apt-transport-https
26+
RUN echo "deb https://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list
27+
RUN curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add
28+
RUN 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
3731

3832
# Install the AWS CLI
3933
RUN curl -sSL https://s3.amazonaws.com/aws-cli/awscli-bundle.zip -o awscli-bundle.zip && \
@@ -62,4 +56,4 @@ USER circleci
6256
# Define working directory
6357
WORKDIR /home/circleci
6458

65-
RUN echo -e "Tag for this image:\n8u222-${SCALA_VERSION}-${KUBECTL_VERSION}"
59+
RUN echo -e "Tag for this image:\n11.0.5-${SCALA_VERSION}-${KUBECTL_VERSION}"

0 commit comments

Comments
 (0)