summaryrefslogtreecommitdiff
path: root/simulator/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'simulator/Dockerfile')
-rw-r--r--simulator/Dockerfile20
1 files changed, 3 insertions, 17 deletions
diff --git a/simulator/Dockerfile b/simulator/Dockerfile
index 880af95d..34280a17 100644
--- a/simulator/Dockerfile
+++ b/simulator/Dockerfile
@@ -1,31 +1,17 @@
-FROM openjdk:14-slim AS staging
+FROM openjdk:15-slim
MAINTAINER OpenDC Maintainers <opendc@atlarge-research.com>
-# Build staging artifacts for dependency caching
-COPY ./ /app
-WORKDIR /app
-RUN mkdir /staging \
- && cp -r buildSrc/ /staging \
- && cp gradle.properties /staging 2>/dev/null | true \
- && find -name "*.gradle.kts" | xargs cp --parents -t /staging
-
-FROM openjdk:14-slim AS builder
-
# Obtain (cache) Gradle wrapper
COPY gradlew /app/
COPY gradle /app/gradle
WORKDIR /app
RUN ./gradlew --version
-# Install (cache) project dependencies only
-COPY --from=staging /staging/ /app/
-RUN ./gradlew clean build --no-daemon > /dev/null 2>&1 || true
-
# Build project
COPY ./ /app/
RUN ./gradlew --no-daemon :opendc-runner-web:installDist
-FROM openjdk:14-slim
-COPY --from=builder /app/opendc-runner-web/build/install /app
+FROM openjdk:15-slim
+COPY --from=0 /app/opendc-runner-web/build/install /app
WORKDIR /app
CMD opendc-runner-web/bin/opendc-runner-web