Go Client and Pushing to a Restricted Registry


#1

I’m stuck on a problem. I’m pushing to an AWS ECR repository and it is not clear how to set credentials along with the client.ImagePush function. I thought it I set the RegistryAuth as the base64 string in ImagePushOptions


#2

This would need moving some functions from docker/cli to moby/moby/client.

I had once tried that ( https://github.com/moby/moby/pull/30817 ).

I’ll reopen the PR.


#3

Explain. Is my problem just because the feature isn’t imported?


#4

Yes, you could push to a restricted registry by just importing some functions from docker/cli.

After discussion at https://github.com/moby/moby/pull/30817#issuecomment-307881740, these functions are decided to continue to exist at docker/cli, but it will be decoupled from DockerCli structure, and will be easy to import for 3rd parties.


#5

opened https://github.com/docker/cli/pull/197