From 58f1b1d373bf56f9cb780d6ae8a54a0c892cc36b Mon Sep 17 00:00:00 2001 From: William Brawner Date: Thu, 18 Nov 2021 20:15:42 -0700 Subject: [PATCH] Fix Dockerfile to not rely on local builds --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6d5273b..0b09872 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,14 @@ FROM openjdk:14-jdk as builder MAINTAINER William Brawner +RUN groupadd --system --gid 1000 gradle \ + && useradd --system --gid gradle --uid 1000 --shell /bin/bash --create-home gradle + +COPY --chown=gradle:gradle . /home/gradle/src +WORKDIR /home/gradle/src +RUN /home/gradle/src/gradlew --console=plain --no-daemon shadowJar + FROM adoptopenjdk:openj9 EXPOSE 8080 -COPY app/build/libs/twigs.jar twigs.jar +COPY --from=builder /home/gradle/src/app/build/libs/twigs.jar twigs.jar CMD /opt/java/openjdk/bin/java $JVM_ARGS -jar /twigs.jar