diff --git a/Dockerfile b/Dockerfile index 0b09872..8113000 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,5 +10,8 @@ RUN /home/gradle/src/gradlew --console=plain --no-daemon shadowJar FROM adoptopenjdk:openj9 EXPOSE 8080 -COPY --from=builder /home/gradle/src/app/build/libs/twigs.jar twigs.jar +RUN groupadd --system --gid 1000 twigs \ + && useradd --system --gid twigs --uid 1000 --create-home twigs +COPY --from=builder --chown=twigs:twigs /home/gradle/src/app/build/libs/twigs.jar twigs.jar +USER twigs CMD /opt/java/openjdk/bin/java $JVM_ARGS -jar /twigs.jar