Dockerfile to how depoy kotlin application with two phases
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 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