From 461b1fa053bcc86d06156574ab59fa7000dbf69e Mon Sep 17 00:00:00 2001 From: Kevin Hoerr Date: Sat, 6 Aug 2022 01:44:00 +0000 Subject: Quarkus (#2) Reviewed-on: https://git.submelon.dev/kjhoerr/pantry/pulls/2 --- src/main/docker/Dockerfile.native | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/main/docker/Dockerfile.native (limited to 'src/main/docker/Dockerfile.native') diff --git a/src/main/docker/Dockerfile.native b/src/main/docker/Dockerfile.native new file mode 100644 index 0000000..2f2edca --- /dev/null +++ b/src/main/docker/Dockerfile.native @@ -0,0 +1,27 @@ +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode. +# +# Before building the container image run: +# +# ./mvnw package -Pnative +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.native -t quarkus/pantry . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/pantry +# +### +FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5 +WORKDIR /work/ +RUN chown 1001 /work \ + && chmod "g+rwX" /work \ + && chown 1001:root /work +COPY --chown=1001:root target/*-runner /work/application + +EXPOSE 8080 +USER 1001 + +CMD ["./application", "-Dquarkus.http.host=0.0.0.0"] -- cgit