When running ctlptl in the context of a CI pipeline, we often see errors from Dockerhub about ratelimiting:
Creating registry "ctlptl-registry"...
pulling image docker.io/library/registry:2: pulling image docker.io/library/registry:2: Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
We have docker login in a previous step of our CI pipeline, so are a bit surprised to see ctlptl issuing unauthenticated requests.
I am definitely not an expert on consuming the Docker CLI programmatically, but it seems like authentication would need to be passed through here:
|
resp, err := c.ImagePull(ctx, image, types.ImagePullOptions{}) |
I suspect it needs to look something like this:
https://github.com/docker/cli/blob/06de1f8d2c56737ea06a547197a5ae3701aa5397/cli/command/image/push.go#L80
When running
ctlptlin the context of a CI pipeline, we often see errors from Dockerhub about ratelimiting:We have
docker loginin a previous step of our CI pipeline, so are a bit surprised to seectlptlissuing unauthenticated requests.I am definitely not an expert on consuming the Docker CLI programmatically, but it seems like authentication would need to be passed through here:
ctlptl/internal/dctr/run.go
Line 107 in 7b17159
I suspect it needs to look something like this:
https://github.com/docker/cli/blob/06de1f8d2c56737ea06a547197a5ae3701aa5397/cli/command/image/push.go#L80