Dockerfile.native-micro 914 B

123456789101112131415161718192021222324252627282930
  1. ####
  2. # This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
  3. # It uses a micro base image, tuned for Quarkus native executables.
  4. # It reduces the size of the resulting container image.
  5. # Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
  6. #
  7. # Before building the container image run:
  8. #
  9. # ./mvnw package -Pnative
  10. #
  11. # Then, build the image with:
  12. #
  13. # docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/finance-webapp .
  14. #
  15. # Then run the container using:
  16. #
  17. # docker run -i --rm -p 8080:8080 quarkus/finance-webapp
  18. #
  19. ###
  20. FROM quay.io/quarkus/quarkus-micro-image:1.0
  21. WORKDIR /work/
  22. RUN chown 1001 /work \
  23. && chmod "g+rwX" /work \
  24. && chown 1001:root /work
  25. COPY --chown=1001:root target/*-runner /work/application
  26. EXPOSE 8080
  27. USER 1001
  28. CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]