Fix Dockerfile to not rely on local builds
This commit is contained in:
parent
3ab7d28741
commit
58f1b1d373
1 changed files with 8 additions and 1 deletions
|
@ -1,7 +1,14 @@
|
||||||
FROM openjdk:14-jdk as builder
|
FROM openjdk:14-jdk as builder
|
||||||
MAINTAINER William Brawner <me@wbrawner.com>
|
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
|
FROM adoptopenjdk:openj9
|
||||||
EXPOSE 8080
|
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
|
CMD /opt/java/openjdk/bin/java $JVM_ARGS -jar /twigs.jar
|
||||||
|
|
Loading…
Reference in a new issue