Fix Dockerfile to not rely on local builds

This commit is contained in:
William Brawner 2021-11-18 20:15:42 -07:00
parent 3ab7d28741
commit 58f1b1d373

View file

@ -1,7 +1,14 @@
FROM openjdk:14-jdk as builder
MAINTAINER William Brawner <me@wbrawner.com>
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