Created
September 20, 2022 15:13
-
-
Save webdevwilson/bbef75ec2fe1c082692d72daf49b940c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# build the application with maven jdk-17 | |
FROM public.ecr.aws/docker/library/maven:3-amazoncorretto-17 AS build | |
WORKDIR /project | |
ADD pom.xml /project | |
RUN mvn verify --fail-never | |
COPY . . | |
RUN mvn package | |
# Add the jar to the final docker image | |
FROM public.ecr.aws/amazoncorretto/amazoncorretto:17 | |
COPY --from=build /project/target/app.jar app.jar | |
ENTRYPOINT ["java", "-jar", "app.jar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment