diff --git a/Dockerfile.build_and_run b/Dockerfile.build_and_run index e68516b0..168838f4 100644 --- a/Dockerfile.build_and_run +++ b/Dockerfile.build_and_run @@ -1,9 +1,23 @@ # STAGE 1: Build the binary -FROM openlaw/scala-builder:node AS builder +FROM openjdk:11-jdk AS builder +ARG SBT_VERSION=1.6.2 + +WORKDIR /app +RUN \ + mkdir /working/ && \ + cd /working/ && \ + curl -L -o sbt-$SBT_VERSION.deb https://repo.scala-sbt.org/scalasbt/debian/sbt-$SBT_VERSION.deb && \ + dpkg -i sbt-$SBT_VERSION.deb && \ + rm sbt-$SBT_VERSION.deb && \ + apt-get update && \ + apt-get install sbt && \ + cd && \ + rm -r /working/ && \ + sbt sbtVersion WORKDIR /src COPY . . -RUN apk add --update nodejs npm +RUN apt-get update && apt-get install -y nodejs npm RUN sbt -mem 2048 dist RUN mkdir dist RUN cd dist && unzip /src/app/jvm/target/universal/*.zip diff --git a/Dockerfile.run b/Dockerfile.run index 723da722..79e9562a 100644 --- a/Dockerfile.run +++ b/Dockerfile.run @@ -1,4 +1,20 @@ -FROM openlaw/scala-builder:node AS builder +# STAGE 1: Build the binary +FROM openjdk:11-jre AS builder +ARG SBT_VERSION=1.6.2 + +WORKDIR /app +RUN \ + mkdir /working/ && \ + cd /working/ && \ + curl -L -o sbt-$SBT_VERSION.deb https://repo.scala-sbt.org/scalasbt/debian/sbt-$SBT_VERSION.deb && \ + dpkg -i sbt-$SBT_VERSION.deb && \ + rm sbt-$SBT_VERSION.deb && \ + apt-get update && \ + apt-get install sbt && \ + cd && \ + rm -r /working/ && \ + sbt sbtVersion WORKDIR /src -RUN apk add --update nodejs npm +RUN apt-get update && apt-get install -y nodejs npm openjdk-11-jdk-headless +