Skip to content

Support authentication from Docker daemon to private docker registry. #22972

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

maxjiang153
Copy link
Contributor

see: #22836

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 16, 2020
@scottfrederick scottfrederick self-assigned this Aug 17, 2020
@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 17, 2020
@philwebb philwebb added this to the 2.4.x milestone Aug 17, 2020
@crimsonvspurple
Copy link

crimsonvspurple commented Aug 29, 2020

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.

@trajano
Copy link

trajano commented Sep 12, 2020

Is there any documentation on how to use this?

@snicoll
Copy link
Member

snicoll commented Sep 12, 2020

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.

@trajano
Copy link

trajano commented Sep 12, 2020

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

@scottfrederick
Copy link
Contributor

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

scottfrederick pushed a commit that referenced this pull request Sep 16, 2020
This commit adds the ability to configure Docker image registry
authentication credentials in the Maven and Gradle plugins. The
authentication credentials are passed to the Docker daemon with
all daemon API calls, and the daemon forwards the credentials to the
image registry when necessary. This makes it possible to use
builder and run images stored in a private Docker registry.

See gh-22972
@scottfrederick
Copy link
Contributor

@wmz7year Thank you very much for the contribution. I made some changes in 86fa814 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.

@scottfrederick scottfrederick modified the milestones: 2.4.x, 2.4.0-M3 Sep 16, 2020
@scottfrederick
Copy link
Contributor

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.

@crimsonvspurple
Copy link

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.

@wilkinsona
Copy link
Member

@crimsonvspurple Support for pushing to a registry was added in 2.4.0-M4. Please see #21001 for details.

humaolin pushed a commit to humaolin/spring-boot that referenced this pull request May 7, 2022
humaolin pushed a commit to humaolin/spring-boot that referenced this pull request May 7, 2022
humaolin pushed a commit to humaolin/spring-boot that referenced this pull request May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants