Last active
July 22, 2020 12:18
-
-
Save urbontaitis/63f286cc3e21624be64188f983561f9a to your computer and use it in GitHub Desktop.
adoptopenjdk docker file: build + run
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.6.3-adoptopenjdk-14 as build | |
WORKDIR /app | |
COPY pom.xml /app | |
COPY src /app/src | |
RUN mvn install | |
FROM openjdk:14-alpine | |
WORKDIR /app | |
COPY --from=build /app/target/app.jar /app | |
EXPOSE 8080 | |
CMD ["java", "-Dspring.profiles.active=${ENVIRONMENT}", "-Xmx128m", "-jar", "app.jar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment