quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.87k stars 2.71k forks source link

Possiblility to set registry for quarkus.native.builder-image #43672

Open comrt opened 2 months ago

comrt commented 2 months ago

Description

The Quarkus Documentation encourages us to use floating tags for the quarkus.native.builder-image.

... It is highly recommended to use the floating tag, so that your builder image remains up-to-date and secure. `
If you absolutely must, you may hard-code to a specific tag (see [here](https://quay.io/repository/quarkus/ubi-quarkus-mandrel-builder-image?tab=tags) for available tags), 
but be aware that you won’t get security updates that way and it’s unsupported.

https://quarkus.io/guides/building-native-image#container-runtime

If you're builds are running behind a proxy like e.g. Artifactory, the quay.io registry is mirrored and reachable under a different name. Therefore it would be nice, if you could only overwrite the registry name for that parameter, so you can always use the latest tag/version encouraged by quarkus.

Implementation ideas

No response

quarkus-bot[bot] commented 2 months ago

/cc @Karm (mandrel), @galderz (mandrel), @zakkak (mandrel,native-image)

zakkak commented 1 month ago

Hello @comrt , I am not sure I understand how the use of a proxy is preventing you from using the floating tag.

Assuming the proxy is example.com you could set quarkus.native.builder-image to example.com/ubi-quarkus-mandrel-builder-image:jdk-21 or similar. The drawback I see with this approach is that when Quarkus is going to bump the floating tag to jdk-25 in a future release (and you update to that Quarkus release) you will need to change it accordingly.

comrt commented 1 month ago

Hi @zakkak that's exacty my situation, you're describing. I set the builder-image manually to the fixed floating tag and have to adjust it with future releases. So my idea was, if i just set the registry, i always use the tag corresponding to the quarkus release.

zakkak commented 1 month ago

@comrt I am not familiar with this kind of setup so I am just thinking out loud here.

Have you tried configuring docker (or podman) to use that proxy? E.g. as in https://docs.docker.com/engine/cli/proxy/ ?