Skip to content
Snippets Groups Projects
Dockerfile.native-micro 902 B
Newer Older
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
# It uses a micro base image, tuned for Quarkus native executables.
# It reduces the size of the resulting container image.
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
#
# Before building the container image run:
#
# ./mvnw package -Pnative
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/api-warehouse .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/api-warehouse
#
###

FROM quay.io/quarkus/quarkus-micro-image:1.0

WORKDIR /work/

COPY target/*-runner /work/application

RUN chown 1001 /work \
    && chmod "g+rwX" /work \
    && chown -R 1001:root /work

USER 1001

EXPOSE 8080

CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]