Created
February 13, 2020 09:34
-
-
Save mikecroft/4292406aeef44a1e8286ba07166ad16d to your computer and use it in GitHub Desktop.
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
#### | |
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode | |
# | |
# Build the image with: | |
# | |
# docker build -f src/main/docker/Dockerfile.multistage -t quarkus/rest-json . | |
# | |
# Then run the container using: | |
# | |
# docker run -i --rm -p 8080:8080 quarkus/rest-json | |
# | |
### | |
FROM quay.io/quarkus/centos-quarkus-maven:19.2.1 AS build | |
COPY ./pom.xml ./pom.xml | |
COPY ./src ./src | |
RUN mvn -Pnative package -DskipTests | |
FROM registry.access.redhat.com/ubi8/ubi-minimal | |
WORKDIR /work/ | |
COPY --from=build /project/target/*-runner /work/application | |
RUN chmod 775 /work | |
EXPOSE 8080 | |
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment