quarkusio/quarkus

Configure all container image names in a one place

Open

#45746 opened on Jan 21, 2025

View on GitHub
 (15 comments) (0 reactions) (0 assignees)Java (12,967 stars) (2,464 forks)batch import
area/container-imagearea/housekeepinggood first issue

Description

Description

Loosely related to #37912

I recently found myself in a situation where I wanted the TS run to use images from Quay.io instead of Docker.io. I had all the necessary images and tags ready, and yet the last mile, to actually make the TS to use them, was a surprisingly annoying experience.

The images found here in pom.xml are a mere subset of what you need to successfully execute all categories from native-tests.json.

Some images are in pom.xml, some are scattered in Java source files and IIUC, some are left to be set by TestContainers and its own defaults.

I ended up doing this before Quarkus build:

find . -name "pom.xml" -exec sed -i 's~image>docker.io/~image>quay.io/MYREPO/~g' {} \;
find . -name "*.java" -exec sed -i 's~"apachepulsar/pulsar:~"quay.io/MYREPO/apachepulsar/pulsar:~g' {} \;
find . -name "*.java" -exec sed -i 's~"axllent/mailpit~"quay.io/MYREPO/axllent/mailpit~g' {} \;
find . -name "*.java" -exec sed -i 's~"docker.io/grafana/otel-lgtm:~"quay.io/MYREPO/grafana/otel-lgtm:~g' {} \;
find . -name "pom.xml" -exec sed -i 's~<name>redis:~<name>quay.io/MYREPO/redis:~g' {} \;
find . -name "*.java" -exec sed -i 's~"rabbitmq:~"quay.io/MYREPO/rabbitmq:~g' {} \;
find . -name "*.java" -exec sed -i 's~"reachfive/fake-smtp-server:~"quay.io/MYREPO/reachfive/fake-smtp-server:~g' {} \;
find . -name "*.java" -exec sed -i 's~"docker.io/vectorized/redpanda~"quay.io/MYREPO/vectorized/redpanda~g' {} \;
find . -name "*.java" -exec sed -i 's~"vectorized/redpanda~"quay.io/MYREPO/vectorized/redpanda~g' {} \; 

...and then Quarkus build and then running the Integration testsuite.

It works, but it feels very brittle.

Proposal

I would like us to be able to configure all images in a one place, being it pom.xml or a property file. The source is riddled with people adding images here and there and you cannot even tell what all containers Quarkus depends on overall without cleverly grepping the sources for strings that might be container names.

I realize various extensions could bring arbitrary container image dependencies. This issue is meant to be concerned with the core Quarkus repo and its Integration testsuite in this main repo.

Implementation ideas

No response

Contributor guide