am getting below pull rate limit issue error.
Running with gitlab-runner 14.0.1 (c1xsefsq)
on gitlab-runners-xxxxxx vjqSst4o
Preparing the "docker+machine" executor 01:42
Using Docker executor with image node:14 ...
Pulling docker image node:14 ...
WARNING: Failed to pull image with policy "always": toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit (manager.go:205:0s)
ERROR: Preparation failed: failed to pull image "node:14" with specified policies [always]:
toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit (manager.go:205:0s)
Activity
To Fix pull rate limit issue with paid docker hub account authentication I have Modify the runner’s config.toml file as follows:
https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#determine-your-docker_auth_config-data
[[runners]]
environment = ["DOCKER_AUTH_CONFIG={\"auths\":{\"registry.example.com:5000\":{\"auth\":\"<NEW ACCESS TOKEN HERE FROM MY DOCKERHUB ACCOUNT>=\"}}}"]
how to fix this rate limit issue to use docker hub authentication for gitlab runner. I tried above configured DOCKER_AUTH_CONFIG in runner environment variable. in access token i used my docker hub access token. How to refer my token from aws param store in terragrunt code.
runners_environment_vars = ["DOCKER_AUTH_CONFIG={"auths":{"https://index.docker.io/v1/":{"auth":"MY TOKEN"}}}"]
I have used exactly the same way as you describe the
DOCKER_AUTH_CONFIGand it works perfectly:Maybe Gitlab has fixed this issue in their docker+machine fork.
Nonetheless, after my build was failling due to the same issue while building my image so I solved it by following the described answer from this SO by adding a
before_scriptwhich writes the content of the variable to the~/.docker/config.jsonfile and it works.