When the Gradle bootBuildImage
task or Maven spring-boot:build-image
goal is configured with an authenticated registry using docker.builderRegistry
, both the builder image and run image will be pulled using the same registry credentials. The plugins should validate that both images are specified with a registry matching the registry specified in docker.builderRegistry
and throw an obvious error message if that's not the case.
Comment From: scottfrederick
both images are specified with a registry matching the registry specified in
docker.builderRegistry
On further analysis, we should just verify that the builder and run images are in the same registry when docker.builderRegistry
authentication is configured. With user authentication, docker.builderRegistry.url
is an optional field (only docker.builderRegistry.username
and docker.builderRegistry.password
are required by the registry) and there is no URL provided with token authentication.