Skip to content

Commit dfc72a7

Browse files
committed
Revert to Quarkus default dockerfiles
1 parent 28e9948 commit dfc72a7

File tree

4 files changed

+25
-15
lines changed

4 files changed

+25
-15
lines changed

src/main/docker/Dockerfile.jvm

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
# This scripts computes the command line to execute your Java application, and
2727
# includes memory/GC tuning.
2828
# You can configure the behavior using the following environment properties:
29-
# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
29+
# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") - Be aware that this will override
30+
# the default JVM options, use `JAVA_OPTS_APPEND` to append options
3031
# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
3132
# in JAVA_OPTS (example: "-Dsome.property=foo")
3233
# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
@@ -77,7 +78,7 @@
7778
# accessed directly. (example: "foo.example.com,bar.example.com")
7879
#
7980
###
80-
FROM registry.access.redhat.com/ubi9/openjdk-21:1.22-1.1747241886
81+
FROM registry.access.redhat.com/ubi9/openjdk-21:1.22
8182

8283
ENV LANGUAGE='en_US:en'
8384

@@ -90,6 +91,8 @@ COPY --chown=185 build/quarkus-app/quarkus/ /deployments/quarkus/
9091

9192
EXPOSE 8080
9293
USER 185
93-
ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
94+
ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
9495
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
9596

97+
ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]
98+

src/main/docker/Dockerfile.legacy-jar

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Before building the container image run:
55
#
6-
# ./gradlew build -Dquarkus.package.type=legacy-jar
6+
# ./gradlew build -Dquarkus.package.jar.type=legacy-jar
77
#
88
# Then, build the image with:
99
#
@@ -26,7 +26,8 @@
2626
# This scripts computes the command line to execute your Java application, and
2727
# includes memory/GC tuning.
2828
# You can configure the behavior using the following environment properties:
29-
# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
29+
# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") - Be aware that this will override
30+
# the default JVM options, use `JAVA_OPTS_APPEND` to append options
3031
# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
3132
# in JAVA_OPTS (example: "-Dsome.property=foo")
3233
# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
@@ -77,7 +78,7 @@
7778
# accessed directly. (example: "foo.example.com,bar.example.com")
7879
#
7980
###
80-
FROM registry.access.redhat.com/ubi9/openjdk-21:1.22-1.1747241886
81+
FROM registry.access.redhat.com/ubi9/openjdk-21:1.22
8182

8283
ENV LANGUAGE='en_US:en'
8384

@@ -87,5 +88,7 @@ COPY build/*-runner.jar /deployments/quarkus-run.jar
8788

8889
EXPOSE 8080
8990
USER 185
90-
ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
91+
ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
9192
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
93+
94+
ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]

src/main/docker/Dockerfile.native

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Before building the container image run:
55
#
6-
# ./gradlew build -Dquarkus.package.type=native
6+
# ./gradlew build -Dquarkus.native.enabled=true
77
#
88
# Then, build the image with:
99
#
@@ -13,15 +13,17 @@
1313
#
1414
# docker run -i --rm -p 8080:8080 quarkus/user-service
1515
#
16+
# The ` registry.access.redhat.com/ubi8/ubi-minimal:8.10` base image is based on UBI 9.
17+
# To use UBI 8, switch to `quay.io/ubi8/ubi-minimal:8.10`.
1618
###
17-
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6-1747218906
19+
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.10
1820
WORKDIR /work/
1921
RUN chown 1001 /work \
2022
&& chmod "g+rwX" /work \
2123
&& chown 1001:root /work
22-
COPY --chown=1001:root build/*-runner /work/application
24+
COPY --chown=1001:root --chmod=0755 build/*-runner /work/application
2325

2426
EXPOSE 8080
2527
USER 1001
2628

27-
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
29+
ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]

src/main/docker/Dockerfile.native-micro

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# Before building the container image run:
88
#
9-
# ./gradlew build -Dquarkus.package.type=native
9+
# ./gradlew build -Dquarkus.native.enabled=true
1010
#
1111
# Then, build the image with:
1212
#
@@ -16,15 +16,17 @@
1616
#
1717
# docker run -i --rm -p 8080:8080 quarkus/user-service
1818
#
19+
# The `quay.io/quarkus/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`.
1921
###
20-
FROM quay.io/quarkus/quarkus-micro-image:3.0
22+
FROM quay.io/quarkus/quarkus-micro-image:2.0
2123
WORKDIR /work/
2224
RUN chown 1001 /work \
2325
&& chmod "g+rwX" /work \
2426
&& chown 1001:root /work
25-
COPY --chown=1001:root build/*-runner /work/application
27+
COPY --chown=1001:root --chmod=0755 build/*-runner /work/application
2628

2729
EXPOSE 8080
2830
USER 1001
2931

30-
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
32+
ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"]

0 commit comments

Comments
 (0)