This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c741a5904dd80bb0752ccc52aeecb31f6ed40525
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Mon Aug 25 10:02:07 2025 +0200

    chore(dsl): harmonize Dockerfile text
---
 .../camel/dsl/jbang/core/commands/Export.java      |  2 ++
 .../dsl/jbang/core/commands/ExportQuarkus.java     |  2 +-
 .../src/main/resources/templates/Dockerfile17.tmpl | 30 +++++++---------------
 .../src/main/resources/templates/Dockerfile21.tmpl | 30 +++++++---------------
 4 files changed, 21 insertions(+), 43 deletions(-)

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 a60ebeb99c2..d43ae2e6b87 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
@@ -346,6 +346,8 @@ public class Export extends ExportBaseCommand {
         IOHelper.close(is);
 
         String appJar = ids[1] + "-" + ids[2] + ".jar";
+        context = context.replaceAll("\\{\\{ \\.ArtifactId }}", ids[1]);
+        context = context.replaceAll("\\{\\{ \\.Version }}", ids[2]);
         context = context.replaceAll("\\{\\{ \\.AppJar }}", appJar);
         Files.writeString(docker.resolve("Dockerfile"), context);
     }
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 28574e60132..1f1736f8203 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
@@ -402,6 +402,7 @@ class ExportQuarkus extends Export {
 
     @Override
     protected void copyDockerFiles(String buildDir) throws Exception {
+        super.copyDockerFiles(buildDir);
         Path docker = Path.of(buildDir).resolve("src/main/docker");
         Files.createDirectories(docker);
         // copy files
@@ -409,7 +410,6 @@ class ExportQuarkus extends Export {
         // Deprecated, use Dockerfile instead
         PathUtils.copyFromStream(is, docker.resolve("Dockerfile.jvm"), true);
         is = 
ExportQuarkus.class.getClassLoader().getResourceAsStream("quarkus-docker/Dockerfile.jvm");
-        PathUtils.copyFromStream(is, docker.resolve("Dockerfile"), true);
         // Deprecated, to be removed in the future
         is = 
ExportQuarkus.class.getClassLoader().getResourceAsStream("quarkus-docker/Dockerfile.legacy-jar");
         PathUtils.copyFromStream(is, docker.resolve("Dockerfile.legacy-jar"), 
true);
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/Dockerfile17.tmpl
 
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/Dockerfile17.tmpl
index 2edafcb82ed..1ecc7041d68 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/Dockerfile17.tmpl
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/Dockerfile17.tmpl
@@ -16,28 +16,11 @@
 #
 
 ####
-# This Dockerfile is used in order to build a container that runs the Quarkus 
application in JVM mode
+# This Dockerfile is used in order to build a container that runs the Camel 
application
 #
-# 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
+# ./mvnw clean package
+# docker build -f src/main/docker/Dockerfile -t {{ .ArtifactId }}:{{ .Version 
}} .
+# docker run -it {{ .ArtifactId }}:{{ .Version }}
 #
 # This image uses the `run-java.sh` script to run the application.
 # This scripts computes the command line to execute your Java application, and
@@ -93,6 +76,11 @@
 # - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that 
can be
 #   accessed directly. (example: "foo.example.com,bar.example.com")
 #
+# 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
+#
 ###
 FROM registry.access.redhat.com/ubi8/openjdk-17:1.21
 
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/Dockerfile21.tmpl
 
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/Dockerfile21.tmpl
index 3d09e017807..5914539d6b5 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/Dockerfile21.tmpl
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/Dockerfile21.tmpl
@@ -16,28 +16,11 @@
 #
 
 ####
-# This Dockerfile is used in order to build a container that runs the Quarkus 
application in JVM mode
+# This Dockerfile is used in order to build a container that runs the Camel 
application
 #
-# 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
+# ./mvnw clean package
+# docker build -f src/main/docker/Dockerfile -t {{ .ArtifactId }}:{{ .Version 
}} .
+# docker run -it {{ .ArtifactId }}:{{ .Version }}
 #
 # This image uses the `run-java.sh` script to run the application.
 # This scripts computes the command line to execute your Java application, and
@@ -93,6 +76,11 @@
 # - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that 
can be
 #   accessed directly. (example: "foo.example.com,bar.example.com")
 #
+# 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
+#
 ###
 FROM registry.access.redhat.com/ubi9/openjdk-21:1.21
 

Reply via email to