Dockerfile.native-micro 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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 -Dnative
  10. #
  11. # Then, build the image with:
  12. #
  13. # docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/order-service .
  14. #
  15. # Then run the container using:
  16. #
  17. # docker run -i --rm -p 8080:8080 quarkus/order-service
  18. #
  19. # The `quay.io/quarkus/ubi9-quarkus-micro-image:2.0` base image is based on UBI 9.
  20. # To use UBI 8, switch to `quay.io/quarkus/quarkus-micro-image:2.0`.
  21. ###
  22. FROM quay.io/quarkus/ubi9-quarkus-micro-image:2.0
  23. WORKDIR /work/
  24. RUN chown 1001 /work \
  25. && chmod "g+rwX" /work \
  26. && chown 1001:root /work
  27. COPY --chown=1001:root --chmod=0755 target/*-runner /work/application
  28. EXPOSE 8080
  29. USER 1001
  30. ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]