Created
August 23, 2020 06:49
-
-
Save sasaken555/d3779b2f4c1c893a3a4ce413f913fa04 to your computer and use it in GitHub Desktop.
Build Open Liberty container image w/ multi-stage build
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
# Build stage | |
FROM maven:3.6-openjdk-11 AS builder | |
WORKDIR /app | |
COPY . /app | |
RUN mvn clean package | |
# Runtime stage | |
FROM openjdk:11 | |
WORKDIR /app | |
COPY --from=builder /app/target/sample-app.jar . | |
# HTTP | |
EXPOSE 9080 | |
# HTTPS | |
EXPOSE 9443 | |
CMD ["java", "-jar", "sample-app.jar"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment