Created
May 10, 2022 03:38
-
-
Save pablohdzvizcarra/7c622cba10e2bf489e2fd11b6cd9f966 to your computer and use it in GitHub Desktop.
Dockerfile to how depoy kotlin application with two phases
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
FROM openjdk:11.0.15-oracle as build | |
RUN mkdir -p /app/source | |
COPY . /app/source | |
WORKDIR /app/source | |
RUN ./mvnw clean package -DskipTests | |
FROM openjdk:11.0.15-oracle as runtime | |
COPY --from=build /app/source/target/*.jar /app/app.jar | |
ENTRYPOINT ["java", "-jar", "/app/app.jar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment