Created
September 27, 2019 14:11
-
-
Save bayzi/703ba4d517112298687b332499dc2ee8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM maven:3.5.4-jdk-8-alpine as builder | |
WORKDIR /app | |
COPY pom.xml ./ | |
RUN mvn dependency:go-offline | |
COPY src src | |
RUN mvn package | |
FROM openjdk:8-jre-alpine | |
RUN addgroup app && adduser app -D -G app | |
USER app | |
COPY --from=builder /app/target/*.jar app.jar | |
EXPOSE 8080 | |
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment