How to Fix Failed Datadog Agent Image Pulls from DockerHub
Today, my client’s ECS tasks suddenly failed at startup. This posed challenges for deploying new code and autoscaling.
Our tasks were failing to start with this error message:
CannotPullContainerError: inspect image has been retried 1 time(s): failed to resolve ref "docker.io/datadog/agent:latest": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization fa...
It appears that we started getting throttled pulling the
datadog/agent:latest image from DockerHub.
To work around this problem, you’ll need to do one of the following.
Authenticate with DockerHub
Use the Google Container Registry (GCR) Mirror
If you want to pull from GCR, change:
Use AWS Public Elastic Container Registry (ECR)
In addition to GCR, Datadog publishes verified images to AWS Public ECR.
If you want to pull from AWS Public ECR, change: