see: #22836

Comment From: crimsonvspurple

If I'm understanding it right, this is needed to bootBuildImage push to ECR? Any idea, when it will be in next milestone?

Thank you in advance.

Comment From: trajano

Is there any documentation on how to use this?

Comment From: snicoll

Is there any documentation on how to use this?

@trajano this issue is open and unresolved so there's nothing to be documented yet I am afraid.

Comment From: trajano

I mean shouldn't this PR also include a change in the documentation on how to use it?

Comment From: scottfrederick

Merging the PR is in progress, with some changes and added documentation.

Comment From: scottfrederick

@wmz7year Thank you very much for the contribution. I made some changes in https://github.com/spring-projects/spring-boot/commit/86fa8144f57ecfa59d02400a4ad26cd6fb297fe1 to refactor the code to better match project conventions and to add documentation.

It took a while to test this, because using the identitytoken authentication described in the Docker Engine documentation does not appear to be supported by the Docker registries I was testing against. Any additional testing and feedback anyone can provide with these authentication options would be appreciated.

Comment From: scottfrederick

If I'm understanding it right, this is needed to bootBuildImage push to ECR?

@crimsonvspurple Apologies for missing this question earlier. The bootBuildImage task won't push the resulting image to a Docker registry, it only creates the image in the local Docker daemon. This feature is needed if custom CNB builder or run images are used and those custom images need to be pulled from a private Docker registry.

Comment From: crimsonvspurple

I could not use spring's image builder to push to ECR even after trying a lot of things. It builds as long as I don't try to push to ECR. The errors always came down to some auth header being missing. I wasn't using any private image but built image was being pushed to private ECR.

I had to switch to jib which worked nicely.

I will give it another shot later.

Comment From: wilkinsona

@crimsonvspurple Support for pushing to a registry was added in 2.4.0-M4. Please see https://github.com/spring-projects/spring-boot/issues/21001 for details.