docker-maven-plugin icon indicating copy to clipboard operation
docker-maven-plugin copied to clipboard

Build Images for Multiple Registries

Open riprasad opened this issue 3 years ago • 2 comments

We are pushing our images to both docker.io and quay.io. Currently, we use this plugin to build the images. However, we are only able to build the images for either docker.io (or) quay.io at a time. We have a script in place that manually tags the images for quay.io and then we push the tagged images to quay.io. is it possible to build images for both registries at a time using this plugin?

Here's the reference of our plugin configuration: https://github.com/Apicurio/apicurio-registry/blob/2.0.0.RC1/distro/docker/pom.xml#L122

riprasad avatar Mar 22 '21 10:03 riprasad

Have you experimented with multiple Maven profiles for the different registries ? Actually and afair only several tags are supported for a single image, but not registries (which can become a bit more tricky when it comes to authentication).

rhuss avatar Mar 22 '21 11:03 rhuss

I was just solving the very same issue and reached this issue description.

Another solution (for anyone who will face the same problem again): I used multiple executions (configured plugin globally, and just changed "second" configuration to point to the second registry). Its more straightforward in my case (than executing Maven project multiple times with different profiles).

Regards

rstribrn avatar Jul 13 '23 12:07 rstribrn