Skip to content

CAMEL-23192: Adds missing dockerfiles#21990

Open
mcarlett wants to merge 1 commit intoapache:mainfrom
mcarlett:CAMEL-23192
Open

CAMEL-23192: Adds missing dockerfiles#21990
mcarlett wants to merge 1 commit intoapache:mainfrom
mcarlett:CAMEL-23192

Conversation

@mcarlett
Copy link
Contributor

No description provided.

@mcarlett
Copy link
Contributor Author

IT tests are in #21987

Copy link
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Clean and straightforward change.

Summary of changes:

  • Adds three missing Quarkus Dockerfile variants (Dockerfile.jvm, Dockerfile.legacy-jar, Dockerfile.native-micro) as resources, aligning with the standard set that Quarkus projects provide.
  • Updates ExportQuarkus.copyDockerFiles() to copy all four Dockerfile variants instead of just Dockerfile.native.
  • Bumps the UBI base image comment in Dockerfile.native from 9.5 to 9.6 (the FROM line already referenced 9.6).

Review notes:

  • The List import is already present in ExportQuarkus.java, so no new import is needed.
  • The null check on the InputStream (if (is != null)) is a good defensive practice.
  • The Dockerfiles follow the standard Quarkus template patterns (UBI9 base images, proper layering, correct entry points).
  • The base class Export.copyDockerFiles() creates the src/main/docker directory and writes a generic Dockerfile; the override correctly calls super first, then adds the Quarkus-specific variants. No conflict.
  • The Dockerfile.native comment fix (9.5 -> 9.6) is a minor correctness improvement.

One minor observation (non-blocking): the PR body is empty. Adding a brief description referencing the JIRA issue would help future readers, but this is cosmetic.

# accessed directly. (example: "foo.example.com,bar.example.com")
#
###
FROM registry.access.redhat.com/ubi9/openjdk-21:1.23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these Dockerfiles up-to-date?

If you generate an app with the latest Quarkus releases you'll see a base image of registry.access.redhat.com/ubi9/openjdk-21-runtime:1.24.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also FWIW - I hacked up a script recently to fetch the latest Dockerfiles. It could perhaps be adapted for this project.

https://github.com/apache/camel-quarkus-examples/blob/camel-quarkus-main/refresh-dockerfiles.sh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @jamesnetherton I get those version for the current LTS (3.27), do we want latest?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want latest?

I think so because 3.33 is about to become the latest LTS stream.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, I kept jdk21 (the latest dockerfile are using jdk25) but I updated it with the latest tag available, thanks!

Copy link
Contributor

@squakez squakez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we remove those resources on purpose. The goal was to harmonize the dockerfiles coming off the export regardless the runtime.

@squakez
Copy link
Contributor

squakez commented Mar 13, 2026

The cleaning work was in #18981

@mcarlett
Copy link
Contributor Author

thanks @squakez I didn't know that in the past there were those files, but so I'm wondering why if we generate the Quarkus application using quarkus-maven-plugin (create goal) those file are generated. Moreover the currently generated Dokerfile is not working, it is like:

COPY --chown=185 target/cheese-0.0.1.jar /deployments/

# Uncomment to expose any given port
# EXPOSE 8080
USER 185
# Uncomment to provide any Java option
# ENV JAVA_OPTS=""
ENV JAVA_APP_JAR="/deployments/cheese-0.0.1.jar"

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

but the jar it uses is not a fat-jar and it doesn't work. So it is a little bit misleading to have this resource

@github-actions
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions github-actions bot added the dsl label Mar 13, 2026
@davsclaus
Copy link
Contributor

yeah the docker files was intented to be like what you get if you create a new quarkus project from code.quarkus.io

SB does not come with that. If we can make a docker file for CSB then that is good, if not maybe we then only make these files exported with quarkus.

@claudio4j
Copy link
Contributor

For the quarkus runtime, isn't best to let the quarkus-container-image-jib extension to take care of it ? It doesn't require a Dockerfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants