question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(cdk-pipelines): Docker rate limit, guidance needed or auth mechanism

See original GitHub issue

Currently can’t deploy because of a rate limiting issue with Docker. You may have seen this in other issues, but the problem here is I have not hit this limit myself (only this single deploy) so for some reason, I believe Docker is flagging all of Codebuild as one “anonymous” source.

Anyway, we need a way to authenticate when using DockerImageAsset from @aws-cdk/aws-ecr-assets or other guidance on how to circumvent this

Error message:

Step 1/9 : FROM node:14-alpine AS build
--
40 | toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
41 | error  : [100%] fail: docker build --tag cdkasset-d0160342c2de47434404b7f88eaefd92e63e83f7178db2ff9a88cc4e0b62f5b2 --file ./docker/ci.Dockerfile . exited with error code 1: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
42 | Failure: Error: docker build --tag cdkasset-d0160342c2de47434404b7f88eaefd92e63e83f7178db2ff9a88cc4e0b62f5b2 --file ./docker/ci.Dockerfile . exited with error code 1: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

Proposed Solution

We need a way to authenticate to associate our accounts with the pull instead of anon.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
cvrajeeshcommented, Jan 2, 2021

one workaround is to use base images from Amazon ECR Public Gallery (https://gallery.ecr.aws/) or create your own public ECR repository and push your images to that.

In my case, I switched from docker hub base image golang:1.14.13 to public ECR base image public.ecr.aws/bitnami/golang:1.14.13

-- FROM golang:1.14.13
++ FROM public.ecr.aws/bitnami/golang:1.14.13
3reactions
JorisLimousinKaizencommented, Dec 3, 2020

Same problem for us, this is a big issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixing Docker Hub Rate Limiting Errors in CI/CD Pipelines
The Docker Hub itself is suggesting that rate limiting is already enforced. ... image from the Docker Hub authentication is not required.
Read more >
class DockerCredential · AWS CDK
Represents credentials used to access a Docker registry. Example. const dockerHubSecret = secretsmanager.Secret.fromSecretCompleteArn(this, 'DHSecret', ...
Read more >
@aws-cdk/aws-ecr-assets | Yarn - Package Manager
This module allows bundling Docker images as assets. Images from Dockerfile. Images are built from a local Docker context directory (with a Dockerfile...
Read more >
Docker Log collection - Datadog Docs
Support for containerd and Podman log collection is limited. Installation. Container Installation; Host Agent; Host Agent with Custom Logging. To run a Docker...
Read more >
Docker rate limit reached in CodeBuild with ECS : r/aws - Reddit
I ran into the same a while back with a CDK project where I was putting out a lot of changes in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found