From ae3e4f27e7e0e6e939742f5d7b3f62d120931be0 Mon Sep 17 00:00:00 2001 From: Marco Carletti Date: Fri, 13 Mar 2026 14:23:37 +0100 Subject: [PATCH 1/4] CAMEL-23192: Adds missing dockerfiles --- .../jbang/core/commands/ExportQuarkus.java | 16 ++- .../resources/quarkus-docker/Dockerfile.jvm | 118 ++++++++++++++++++ .../quarkus-docker/Dockerfile.legacy-jar | 114 +++++++++++++++++ .../quarkus-docker/Dockerfile.native | 4 +- .../quarkus-docker/Dockerfile.native-micro | 52 ++++++++ 5 files changed, 299 insertions(+), 5 deletions(-) create mode 100644 dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm create mode 100644 dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.legacy-jar create mode 100644 dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.native-micro diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java index bd3b4366ec512..e72c457e7b46a 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java @@ -279,9 +279,19 @@ protected void copyDockerFiles(String buildDir) throws Exception { super.copyDockerFiles(buildDir); Path docker = Path.of(buildDir).resolve("src/main/docker"); Files.createDirectories(docker); - // copy files - InputStream is = ExportQuarkus.class.getClassLoader().getResourceAsStream("quarkus-docker/Dockerfile.native"); - PathUtils.copyFromStream(is, docker.resolve("Dockerfile.native"), true); + // copy all Dockerfile variants + List dockerfiles = List.of( + "Dockerfile.jvm", + "Dockerfile.legacy-jar", + "Dockerfile.native", + "Dockerfile.native-micro" + ); + for (String dockerfile : dockerfiles) { + InputStream is = ExportQuarkus.class.getClassLoader().getResourceAsStream("quarkus-docker/" + dockerfile); + if (is != null) { + PathUtils.copyFromStream(is, docker.resolve(dockerfile), true); + } + } } @Override diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm new file mode 100644 index 0000000000000..d75aae7c51e62 --- /dev/null +++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm @@ -0,0 +1,118 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode +# +# Before building the container image run: +# +# ./mvnw package +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/code-with-quarkus-jvm . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-jvm +# +# If you want to include the debug port into your docker image +# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005. +# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005 +# when running the container +# +# Then run the container using : +# +# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-jvm +# +# This image uses the `run-java.sh` script to run the application. +# This scripts computes the command line to execute your Java application, and +# includes memory/GC tuning. +# You can configure the behavior using the following environment properties: +# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") - Be aware that this will override +# the default JVM options, use `JAVA_OPTS_APPEND` to append options +# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options +# in JAVA_OPTS (example: "-Dsome.property=foo") +# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is +# used to calculate a default maximal heap memory based on a containers restriction. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio +# of the container available memory as set here. The default is `50` which means 50% +# of the available memory is used as an upper boundary. You can skip this mechanism by +# setting this value to `0` in which case no `-Xmx` option is added. +# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This +# is used to calculate a default initial heap memory based on the maximum heap memory. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio +# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` +# is used as the initial heap size. You can skip this mechanism by setting this value +# to `0` in which case no `-Xms` option is added (example: "25") +# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS. +# This is used to calculate the maximum value of the initial heap memory. If used in +# a container without any memory constraints for the container then this option has +# no effect. If there is a memory constraint then `-Xms` is limited to the value set +# here. The default is 4096MB which means the calculated value of `-Xms` never will +# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096") +# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output +# when things are happening. This option, if set to true, will set +# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true"). +# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example: +# true"). +# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787"). +# - CONTAINER_CORE_LIMIT: A calculated core limit as described in +# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2") +# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024"). +# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion. +# (example: "20") +# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking. +# (example: "40") +# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection. +# (example: "4") +# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus +# previous GC times. (example: "90") +# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20") +# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100") +# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should +# contain the necessary JRE command-line options to specify the required GC, which +# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC). +# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080") +# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080") +# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be +# accessed directly. (example: "foo.example.com,bar.example.com") +# +### +FROM registry.access.redhat.com/ubi9/openjdk-21:1.24 + +ENV LANGUAGE='en_US:en' + + +# We make four distinct layers so if there are application changes the library layers can be re-used +COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/ +COPY --chown=185 target/quarkus-app/*.jar /deployments/ +COPY --chown=185 target/quarkus-app/app/ /deployments/app/ +COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ + +# Uncomment to expose any given port +# EXPOSE 8080 +USER 185 +# Use this if you're exposing some port +#ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_OPTS_APPEND="-Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" + +ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] + diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.legacy-jar b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.legacy-jar new file mode 100644 index 0000000000000..4408122f4fe5a --- /dev/null +++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.legacy-jar @@ -0,0 +1,114 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode +# +# Before building the container image run: +# +# ./mvnw package -Dquarkus.package.jar.type=legacy-jar +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/code-with-quarkus-legacy-jar . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-legacy-jar +# +# If you want to include the debug port into your docker image +# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005. +# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005 +# when running the container +# +# Then run the container using : +# +# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-legacy-jar +# +# This image uses the `run-java.sh` script to run the application. +# This scripts computes the command line to execute your Java application, and +# includes memory/GC tuning. +# You can configure the behavior using the following environment properties: +# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") - Be aware that this will override +# the default JVM options, use `JAVA_OPTS_APPEND` to append options +# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options +# in JAVA_OPTS (example: "-Dsome.property=foo") +# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is +# used to calculate a default maximal heap memory based on a containers restriction. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio +# of the container available memory as set here. The default is `50` which means 50% +# of the available memory is used as an upper boundary. You can skip this mechanism by +# setting this value to `0` in which case no `-Xmx` option is added. +# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This +# is used to calculate a default initial heap memory based on the maximum heap memory. +# If used in a container without any memory constraints for the container then this +# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio +# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` +# is used as the initial heap size. You can skip this mechanism by setting this value +# to `0` in which case no `-Xms` option is added (example: "25") +# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS. +# This is used to calculate the maximum value of the initial heap memory. If used in +# a container without any memory constraints for the container then this option has +# no effect. If there is a memory constraint then `-Xms` is limited to the value set +# here. The default is 4096MB which means the calculated value of `-Xms` never will +# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096") +# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output +# when things are happening. This option, if set to true, will set +# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true"). +# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example: +# true"). +# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787"). +# - CONTAINER_CORE_LIMIT: A calculated core limit as described in +# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2") +# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024"). +# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion. +# (example: "20") +# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking. +# (example: "40") +# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection. +# (example: "4") +# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus +# previous GC times. (example: "90") +# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20") +# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100") +# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should +# contain the necessary JRE command-line options to specify the required GC, which +# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC). +# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080") +# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080") +# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be +# accessed directly. (example: "foo.example.com,bar.example.com") +# +### +FROM registry.access.redhat.com/ubi9/openjdk-21:1.24 + +ENV LANGUAGE='en_US:en' + + +COPY target/lib/* /deployments/lib/ +COPY target/*-runner.jar /deployments/quarkus-run.jar + +# Uncomment to expose any given port +# EXPOSE 8080 +USER 185 +# Use this if you're exposing some port +#ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_OPTS_APPEND="-Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" + +ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.native b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.native index b4d920348926f..8771b0fb21529 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.native +++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.native @@ -30,10 +30,10 @@ # # docker run -i quarkus/code-with-quarkus # -# The ` registry.access.redhat.com/ubi9/ubi-minimal:9.5` base image is based on UBI 9. +# The ` registry.access.redhat.com/ubi9/ubi-minimal:9.7` base image is based on UBI 9. # To use UBI 8, switch to `quay.io/ubi8/ubi-minimal:8.10`. ### -FROM registry.access.redhat.com/ubi9/ubi-minimal:9.6 +FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7 WORKDIR /work/ RUN chown 1001 /work \ && chmod "g+rwX" /work \ diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.native-micro b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.native-micro new file mode 100644 index 0000000000000..12568be5f61aa --- /dev/null +++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.native-micro @@ -0,0 +1,52 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### +# 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 -Dnative +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/code-with-quarkus . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus +# +# The `quay.io/quarkus/ubi9-quarkus-micro-image:2.0` base image is based on UBI 9. +# To use UBI 8, switch to `quay.io/quarkus/quarkus-micro-image:2.0`. +### +FROM quay.io/quarkus/ubi9-quarkus-micro-image:2.0 +WORKDIR /work/ +RUN chown 1001 /work \ + && chmod "g+rwX" /work \ + && chown 1001:root /work +COPY --chown=1001:root --chmod=0755 target/*-runner /work/application + +# Uncomment to expose any given port +# EXPOSE 8080 +USER 1001 + +# Use this if you're exposing some port +# ENTRYPOINT ["./application", "-Dquarkus.http.host=0.0.0.0"] +ENTRYPOINT ["./application"] From da6e0b8e01599b3279186de5e9d1990a6c0b3e39 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Thu, 19 Mar 2026 08:19:10 +0100 Subject: [PATCH 2/4] Use Quarkus JVM Dockerfile as the main Dockerfile instead of the generic one The generic Dockerfile template expects a fat jar which doesn't work for Quarkus (it uses a layered quarkus-app/ structure). Instead of calling super.copyDockerFiles() which generates a broken Dockerfile, use the Quarkus JVM Dockerfile as the main Dockerfile. The native and legacy-jar variants are copied as extras for alternative packaging modes. Co-Authored-By: Claude Opus 4.6 --- .../dsl/jbang/core/commands/ExportQuarkus.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java index e72c457e7b46a..338dfe29b0145 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java @@ -276,17 +276,20 @@ protected String applicationPropertyLine(String key, String value) { @Override protected void copyDockerFiles(String buildDir) throws Exception { - super.copyDockerFiles(buildDir); Path docker = Path.of(buildDir).resolve("src/main/docker"); Files.createDirectories(docker); - // copy all Dockerfile variants - List dockerfiles = List.of( - "Dockerfile.jvm", + // Use the Quarkus JVM Dockerfile as the main Dockerfile (the generic template + // does not work for Quarkus because it expects a fat jar). + InputStream jvm = ExportQuarkus.class.getClassLoader().getResourceAsStream("quarkus-docker/Dockerfile.jvm"); + if (jvm != null) { + PathUtils.copyFromStream(jvm, docker.resolve("Dockerfile"), true); + } + // Copy additional Dockerfile variants for alternative Quarkus packaging modes + List extras = List.of( "Dockerfile.legacy-jar", "Dockerfile.native", - "Dockerfile.native-micro" - ); - for (String dockerfile : dockerfiles) { + "Dockerfile.native-micro"); + for (String dockerfile : extras) { InputStream is = ExportQuarkus.class.getClassLoader().getResourceAsStream("quarkus-docker/" + dockerfile); if (is != null) { PathUtils.copyFromStream(is, docker.resolve(dockerfile), true); From 71ca07d9f2367fd032dcd16eec8aed9798ccfa4c Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Thu, 19 Mar 2026 09:09:43 +0100 Subject: [PATCH 3/4] CAMEL-23192: Use uber-jar for Quarkus so generic Dockerfile works Layer 1: Configure Quarkus to produce an uber-jar via quarkus.package.jar.type=uber-jar in the POM template. This makes the generic Dockerfile template work for Quarkus just like other runtimes. Layer 2: Additionally copy Quarkus-specific native Dockerfiles (Dockerfile.native, Dockerfile.native-micro) for advanced build modes. Co-Authored-By: Claude Opus 4.6 --- .../jbang/core/commands/ExportQuarkus.java | 19 +-- .../resources/quarkus-docker/Dockerfile.jvm | 118 ------------------ .../quarkus-docker/Dockerfile.legacy-jar | 114 ----------------- .../main/resources/templates/quarkus-pom.tmpl | 1 + 4 files changed, 6 insertions(+), 246 deletions(-) delete mode 100644 dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm delete mode 100644 dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.legacy-jar diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java index 338dfe29b0145..d32a8c761bb57 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java @@ -129,7 +129,7 @@ public Integer export() throws Exception { }); // copy docker files copyDockerFiles(BUILD_DIR); - String appJar = "target" + File.separator + "quarkus-app" + File.separator + "quarkus-run.jar"; + String appJar = "target" + File.separator + ids[1] + "-" + ids[2] + ".jar"; copyReadme(BUILD_DIR, appJar); // gather dependencies Set deps = resolveDependencies(settings, profile); @@ -276,20 +276,11 @@ protected String applicationPropertyLine(String key, String value) { @Override protected void copyDockerFiles(String buildDir) throws Exception { + // Layer 1: generic Dockerfile (works because Quarkus is configured to produce an uber-jar) + super.copyDockerFiles(buildDir); + // Layer 2: Quarkus-specific Dockerfiles for native builds Path docker = Path.of(buildDir).resolve("src/main/docker"); - Files.createDirectories(docker); - // Use the Quarkus JVM Dockerfile as the main Dockerfile (the generic template - // does not work for Quarkus because it expects a fat jar). - InputStream jvm = ExportQuarkus.class.getClassLoader().getResourceAsStream("quarkus-docker/Dockerfile.jvm"); - if (jvm != null) { - PathUtils.copyFromStream(jvm, docker.resolve("Dockerfile"), true); - } - // Copy additional Dockerfile variants for alternative Quarkus packaging modes - List extras = List.of( - "Dockerfile.legacy-jar", - "Dockerfile.native", - "Dockerfile.native-micro"); - for (String dockerfile : extras) { + for (String dockerfile : List.of("Dockerfile.native", "Dockerfile.native-micro")) { InputStream is = ExportQuarkus.class.getClassLoader().getResourceAsStream("quarkus-docker/" + dockerfile); if (is != null) { PathUtils.copyFromStream(is, docker.resolve(dockerfile), true); diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm deleted file mode 100644 index d75aae7c51e62..0000000000000 --- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm +++ /dev/null @@ -1,118 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -#### -# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode -# -# Before building the container image run: -# -# ./mvnw package -# -# Then, build the image with: -# -# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/code-with-quarkus-jvm . -# -# Then run the container using: -# -# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-jvm -# -# If you want to include the debug port into your docker image -# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005. -# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005 -# when running the container -# -# Then run the container using : -# -# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-jvm -# -# This image uses the `run-java.sh` script to run the application. -# This scripts computes the command line to execute your Java application, and -# includes memory/GC tuning. -# You can configure the behavior using the following environment properties: -# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") - Be aware that this will override -# the default JVM options, use `JAVA_OPTS_APPEND` to append options -# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options -# in JAVA_OPTS (example: "-Dsome.property=foo") -# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is -# used to calculate a default maximal heap memory based on a containers restriction. -# If used in a container without any memory constraints for the container then this -# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio -# of the container available memory as set here. The default is `50` which means 50% -# of the available memory is used as an upper boundary. You can skip this mechanism by -# setting this value to `0` in which case no `-Xmx` option is added. -# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This -# is used to calculate a default initial heap memory based on the maximum heap memory. -# If used in a container without any memory constraints for the container then this -# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio -# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` -# is used as the initial heap size. You can skip this mechanism by setting this value -# to `0` in which case no `-Xms` option is added (example: "25") -# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS. -# This is used to calculate the maximum value of the initial heap memory. If used in -# a container without any memory constraints for the container then this option has -# no effect. If there is a memory constraint then `-Xms` is limited to the value set -# here. The default is 4096MB which means the calculated value of `-Xms` never will -# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096") -# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output -# when things are happening. This option, if set to true, will set -# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true"). -# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example: -# true"). -# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787"). -# - CONTAINER_CORE_LIMIT: A calculated core limit as described in -# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2") -# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024"). -# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion. -# (example: "20") -# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking. -# (example: "40") -# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection. -# (example: "4") -# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus -# previous GC times. (example: "90") -# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20") -# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100") -# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should -# contain the necessary JRE command-line options to specify the required GC, which -# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC). -# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080") -# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080") -# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be -# accessed directly. (example: "foo.example.com,bar.example.com") -# -### -FROM registry.access.redhat.com/ubi9/openjdk-21:1.24 - -ENV LANGUAGE='en_US:en' - - -# We make four distinct layers so if there are application changes the library layers can be re-used -COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/ -COPY --chown=185 target/quarkus-app/*.jar /deployments/ -COPY --chown=185 target/quarkus-app/app/ /deployments/app/ -COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ - -# Uncomment to expose any given port -# EXPOSE 8080 -USER 185 -# Use this if you're exposing some port -#ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" -ENV JAVA_OPTS_APPEND="-Djava.util.logging.manager=org.jboss.logmanager.LogManager" -ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" - -ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] - diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.legacy-jar b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.legacy-jar deleted file mode 100644 index 4408122f4fe5a..0000000000000 --- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.legacy-jar +++ /dev/null @@ -1,114 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -#### -# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode -# -# Before building the container image run: -# -# ./mvnw package -Dquarkus.package.jar.type=legacy-jar -# -# Then, build the image with: -# -# docker build -f src/main/docker/Dockerfile.legacy-jar -t quarkus/code-with-quarkus-legacy-jar . -# -# Then run the container using: -# -# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-legacy-jar -# -# If you want to include the debug port into your docker image -# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005. -# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005 -# when running the container -# -# Then run the container using : -# -# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus-legacy-jar -# -# This image uses the `run-java.sh` script to run the application. -# This scripts computes the command line to execute your Java application, and -# includes memory/GC tuning. -# You can configure the behavior using the following environment properties: -# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class") - Be aware that this will override -# the default JVM options, use `JAVA_OPTS_APPEND` to append options -# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options -# in JAVA_OPTS (example: "-Dsome.property=foo") -# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is -# used to calculate a default maximal heap memory based on a containers restriction. -# If used in a container without any memory constraints for the container then this -# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio -# of the container available memory as set here. The default is `50` which means 50% -# of the available memory is used as an upper boundary. You can skip this mechanism by -# setting this value to `0` in which case no `-Xmx` option is added. -# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This -# is used to calculate a default initial heap memory based on the maximum heap memory. -# If used in a container without any memory constraints for the container then this -# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio -# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` -# is used as the initial heap size. You can skip this mechanism by setting this value -# to `0` in which case no `-Xms` option is added (example: "25") -# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS. -# This is used to calculate the maximum value of the initial heap memory. If used in -# a container without any memory constraints for the container then this option has -# no effect. If there is a memory constraint then `-Xms` is limited to the value set -# here. The default is 4096MB which means the calculated value of `-Xms` never will -# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096") -# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output -# when things are happening. This option, if set to true, will set -# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true"). -# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example: -# true"). -# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787"). -# - CONTAINER_CORE_LIMIT: A calculated core limit as described in -# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2") -# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024"). -# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion. -# (example: "20") -# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking. -# (example: "40") -# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection. -# (example: "4") -# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus -# previous GC times. (example: "90") -# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20") -# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100") -# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should -# contain the necessary JRE command-line options to specify the required GC, which -# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC). -# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080") -# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080") -# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be -# accessed directly. (example: "foo.example.com,bar.example.com") -# -### -FROM registry.access.redhat.com/ubi9/openjdk-21:1.24 - -ENV LANGUAGE='en_US:en' - - -COPY target/lib/* /deployments/lib/ -COPY target/*-runner.jar /deployments/quarkus-run.jar - -# Uncomment to expose any given port -# EXPOSE 8080 -USER 185 -# Use this if you're exposing some port -#ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" -ENV JAVA_OPTS_APPEND="-Djava.util.logging.manager=org.jboss.logmanager.LogManager" -ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" - -ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl index 09f7edd783468..92fcf810369c2 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl +++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl @@ -18,6 +18,7 @@ {{ .QuarkusArtifactId }} {{ .QuarkusVersion }} {{ .BuildProperties }} + uber-jar true 3.5.5 From 6ecaed1452f3c99d32da2d70b83d13f052b72ce5 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Thu, 19 Mar 2026 15:22:45 +0100 Subject: [PATCH 4/4] CAMEL-23192: Support both uber-jar and fast-jar Quarkus packaging Add --quarkus-package-type option (default: uber-jar) to allow users to choose between uber-jar and fast-jar packaging for Quarkus exports. For fast-jar, a Quarkus-specific JVM Dockerfile is used that copies the quarkus-app/ directory with separate layers for better Docker layer caching. For uber-jar, the generic Dockerfile is used as before. Co-Authored-By: Claude Opus 4.6 --- .../camel/dsl/jbang/core/commands/Export.java | 1 + .../core/commands/ExportBaseCommand.java | 5 ++ .../jbang/core/commands/ExportQuarkus.java | 25 +++++++-- .../resources/quarkus-docker/Dockerfile.jvm | 51 +++++++++++++++++++ .../main/resources/templates/quarkus-pom.tmpl | 2 +- 5 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Export.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Export.java index 3f3c7064ea5d5..17a6f11d6ff63 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Export.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Export.java @@ -242,6 +242,7 @@ protected Integer export(Path exportBaseDir, ExportBaseCommand cmd) throws Excep cmd.quarkusGroupId = this.quarkusGroupId; cmd.quarkusArtifactId = this.quarkusArtifactId; cmd.quarkusVersion = this.quarkusVersion; + cmd.quarkusPackageType = this.quarkusPackageType; cmd.springBootVersion = this.springBootVersion; cmd.mavenWrapper = this.mavenWrapper; cmd.quiet = this.quiet; diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java index f4f8f45f7338a..e62ad974f6fbd 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java @@ -199,6 +199,11 @@ public abstract class ExportBaseCommand extends CamelCommand { defaultValue = RuntimeType.QUARKUS_VERSION) protected String quarkusVersion = RuntimeType.QUARKUS_VERSION; + @CommandLine.Option(names = { "--quarkus-package-type" }, + description = "Quarkus package type (uber-jar or fast-jar)", + defaultValue = "uber-jar") + protected String quarkusPackageType = "uber-jar"; + @CommandLine.Option(names = { "--maven-wrapper" }, defaultValue = "true", description = "Include Maven Wrapper files in exported project") protected boolean mavenWrapper = true; diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java index d32a8c761bb57..56ae6c1513a00 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportQuarkus.java @@ -129,7 +129,12 @@ public Integer export() throws Exception { }); // copy docker files copyDockerFiles(BUILD_DIR); - String appJar = "target" + File.separator + ids[1] + "-" + ids[2] + ".jar"; + String appJar; + if ("fast-jar".equals(quarkusPackageType)) { + appJar = "target" + File.separator + "quarkus-app" + File.separator + "quarkus-run.jar"; + } else { + appJar = "target" + File.separator + ids[1] + "-" + ids[2] + ".jar"; + } copyReadme(BUILD_DIR, appJar); // gather dependencies Set deps = resolveDependencies(settings, profile); @@ -276,9 +281,20 @@ protected String applicationPropertyLine(String key, String value) { @Override protected void copyDockerFiles(String buildDir) throws Exception { - // Layer 1: generic Dockerfile (works because Quarkus is configured to produce an uber-jar) - super.copyDockerFiles(buildDir); - // Layer 2: Quarkus-specific Dockerfiles for native builds + if ("uber-jar".equals(quarkusPackageType)) { + // For uber-jar, the generic Dockerfile works as-is + super.copyDockerFiles(buildDir); + } else { + // For fast-jar, use a Quarkus-specific JVM Dockerfile + Path docker = Path.of(buildDir).resolve("src/main/docker"); + Files.createDirectories(docker); + InputStream is + = ExportQuarkus.class.getClassLoader().getResourceAsStream("quarkus-docker/Dockerfile.jvm"); + if (is != null) { + PathUtils.copyFromStream(is, docker.resolve("Dockerfile"), true); + } + } + // Quarkus-specific Dockerfiles for native builds Path docker = Path.of(buildDir).resolve("src/main/docker"); for (String dockerfile : List.of("Dockerfile.native", "Dockerfile.native-micro")) { InputStream is = ExportQuarkus.class.getClassLoader().getResourceAsStream("quarkus-docker/" + dockerfile); @@ -329,6 +345,7 @@ private void createMavenPom(Path settings, Path pom, Set deps) throws Ex context = context.replaceAll("\\{\\{ \\.QuarkusGroupId }}", quarkusGroupId); context = context.replaceAll("\\{\\{ \\.QuarkusArtifactId }}", quarkusArtifactId); context = context.replaceAll("\\{\\{ \\.QuarkusVersion }}", quarkusVersion); + context = context.replaceAll("\\{\\{ \\.QuarkusPackageType }}", quarkusPackageType); context = context.replaceAll("\\{\\{ \\.QuarkusManagementPort }}", mp); context = context.replaceAll("\\{\\{ \\.JavaVersion }}", javaVersion); context = context.replaceAll("\\{\\{ \\.CamelVersion }}", camelVersion); diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm new file mode 100644 index 0000000000000..e3204cf0719d0 --- /dev/null +++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/quarkus-docker/Dockerfile.jvm @@ -0,0 +1,51 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +#### +# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode +# using the fast-jar packaging. +# +# Before building the container image run: +# +# ./mvnw clean package +# +# Then, build the image with: +# +# docker build -f src/main/docker/Dockerfile -t quarkus/camel-app . +# +# Then run the container using: +# +# docker run -i --rm -p 8080:8080 quarkus/camel-app +# +### +FROM registry.access.redhat.com/ubi9/openjdk-21:1.23 + +ENV LANGUAGE='en_US:en' + +# We make four distinct layers so if there are application changes the library layers can be re-used +COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/ +COPY --chown=185 target/quarkus-app/*.jar /deployments/ +COPY --chown=185 target/quarkus-app/app/ /deployments/app/ +COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ + +# Uncomment to expose any given port +# EXPOSE 8080 +USER 185 +ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" +ENV JAVA_APP_JAR="/deployments/quarkus-run.jar" + +ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ] diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl index 92fcf810369c2..bdd439a8c35fb 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl +++ b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/quarkus-pom.tmpl @@ -18,7 +18,7 @@ {{ .QuarkusArtifactId }} {{ .QuarkusVersion }} {{ .BuildProperties }} - uber-jar + {{ .QuarkusPackageType }} true 3.5.5