Title: Regression in 0.48.1: Execution-level pushRegistry not applied to all images in multi-image builds
Description:
Issue Description
After upgrading from docker-maven-plugin version 0.44.0 to 0.48.1, the execution-level <pushRegistry> configuration is no longer consistently applied to all images when building multiple images in a single project. The second image defaults to ghcr.io instead of using the configured registry.
Environment
- Plugin Version (broken): 0.48.1
- Plugin Version (working): 0.44.0
- Maven Version: 3.x
- Docker Version: 29+
Configuration
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.48.1</version>
<executions>
<execution>
<id>push-docker-image</id>
<goals>
<goal>push</goal>
</goals>
<phase>deploy</phase>
<configuration>
<pushRegistry>${docker.push.registry}</pushRegistry>
</configuration>
</execution>
</executions>
<configuration>
<pullRegistry>${docker.registry}</pullRegistry>
<pushRegistry>${docker.push.registry}</pushRegistry>
</configuration>
</plugin>
<!-- In the actual plugin usage -->
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>mycompany/myapp-service:${project.version}</name>
<alias>myapp-service</alias>
<build>
<dockerFile>Dockerfile-service</dockerFile>
</build>
</image>
<image>
<name>mycompany/myapp-client:${project.version}</name>
<alias>myapp-client</alias>
<build>
<dockerFile>Dockerfile-client</dockerFile>
</build>
</image>
</images>
</configuration>
</plugin>
Where ${docker.push.registry} = registry.example.com:8080
Expected Behavior (0.44.0)
Both images should be pushed to the registry specified in the execution-level <pushRegistry> configuration:
myapp-service → registry.example.com:8080 ✓
myapp-client → registry.example.com:8080 ✓
Actual Behavior (0.48.1)
The first image pushes correctly, but the second image attempts to push to ghcr.io:
myapp-service → registry.example.com:8080 ✓
myapp-client → ghcr.io ✗
Build Output
[INFO] --- docker-maven-plugin:0.48.1:push (push-docker-image) @ myapp ---
[INFO] DOCKER> The push refers to repository [registry.example.com:8080/mycompany/myapp-service]
[INFO] DOCKER> 1.0.0-SNAPSHOT: digest: sha256:d331db402730c71f906aae31db1adf8fec0dec6c67be029afb33d28a3c6a0083 size: 6842
[INFO] DOCKER> Pushed mycompany/myapp-service:1.0.0-SNAPSHOT in 40 seconds
[INFO] DOCKER> The push refers to repository [ghcr.io/mycompany/myapp-client]
[ERROR] DOCKER> Unable to push 'mycompany/myapp-client:1.0.0-SNAPSHOT' to registry 'ghcr.io' : unauthorized: unauthenticated: User cannot be authenticated with the token provided.
Request
Could you please:
- Confirm if this is an intentional breaking change or a bug
- Document the expected behavior for registry configuration precedence (execution-level vs image-level vs global)
- If this is a bug, restore the 0.44.0 behavior where execution-level
<pushRegistry> applies to all images
Thank you!
Title: Regression in 0.48.1: Execution-level
pushRegistrynot applied to all images in multi-image buildsDescription:
Issue Description
After upgrading from
docker-maven-pluginversion 0.44.0 to 0.48.1, the execution-level<pushRegistry>configuration is no longer consistently applied to all images when building multiple images in a single project. The second image defaults toghcr.ioinstead of using the configured registry.Environment
Configuration
Where
${docker.push.registry}=registry.example.com:8080Expected Behavior (0.44.0)
Both images should be pushed to the registry specified in the execution-level
<pushRegistry>configuration:myapp-service→registry.example.com:8080✓myapp-client→registry.example.com:8080✓Actual Behavior (0.48.1)
The first image pushes correctly, but the second image attempts to push to
ghcr.io:myapp-service→registry.example.com:8080✓myapp-client→ghcr.io✗Build Output
Request
Could you please:
<pushRegistry>applies to all imagesThank you!