diff options
| author | Kevin Hoerr <kjhoerr@noreply.cybr.es> | 2022-08-06 01:44:00 +0000 |
|---|---|---|
| committer | Kevin Hoerr <kjhoerr@noreply.cybr.es> | 2022-08-06 01:44:00 +0000 |
| commit | 461b1fa053bcc86d06156574ab59fa7000dbf69e (patch) | |
| tree | 6e0080d057b5015bd92c843481cf45575af462a8 /src/main/docker/Dockerfile.native-micro | |
| parent | cdf65b32202746eaffd9e58bf951d1995ab03be3 (diff) | |
| download | pantry-461b1fa053bcc86d06156574ab59fa7000dbf69e.tar.gz pantry-461b1fa053bcc86d06156574ab59fa7000dbf69e.tar.bz2 pantry-461b1fa053bcc86d06156574ab59fa7000dbf69e.zip | |
Quarkus (#2)
Reviewed-on: https://git.submelon.dev/kjhoerr/pantry/pulls/2
Diffstat (limited to 'src/main/docker/Dockerfile.native-micro')
| -rw-r--r-- | src/main/docker/Dockerfile.native-micro | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/main/docker/Dockerfile.native-micro b/src/main/docker/Dockerfile.native-micro new file mode 100644 index 0000000..ededc88 --- /dev/null +++ b/src/main/docker/Dockerfile.native-micro @@ -0,0 +1,30 @@ +#### +# 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/pantry . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/pantry +# +### +FROM quay.io/quarkus/quarkus-micro-image:1.0 +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"] |
