forked from quarkusio/quarkus-quickstarts
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.native
35 lines (33 loc) · 976 Bytes
/
Dockerfile.native
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
####
# 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
#
# or
#
# ./mvnw package -Pnative -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel:21.3-java11
#
# If you don't have necessary libraries installed locally.
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native -t quarkus/awt-graphics-rest .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/awt-graphics-rest
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
RUN microdnf install freetype fontconfig \
&& microdnf clean all
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"]