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.

Docker Hub Rate Limiting Workaround

See original GitHub issue

Description

Docker Hub has recently implemented rate limiting for downloading Docker images from their website. As the Discovery process relies on the base nodejs image hosted there, sometimes when installing AWS Perspective and error will occur when building the container for Fargate to run.

How Do I Know I’m Affected

Typically, listing the AWS Perspective images in ECR (it will be named perspectivecontainerrepo- with a random alphanumeric string appended) should display the image built during install, this will be empty if there has been an error. Alternatively, you may check the CodePipeline job to see if the build has errored (it will be named aws-perspective-<your-account-number>-<region>-TaskStack- with a random alphanumeric string appended).

Remediation

It is possible that by restarting the CodePipeline job, the build may run successfully but for a more reliable workaround, changing the Discovery process Dockerfile to use a different public repository is preferred. This will require you to clone the git repository and build the container locally before pushing it to ECR.

  1. Clone the Perspective repository:
git clone git@github.com:awslabs/aws-perspective.git
  1. Enter the AWS Perspective directory
cd aws-perspective
  1. Enter the Discovery process code directory
cd source/backend/discovery
  1. Replace the contents of the Discovery Docker in (source/backend/discovery/Dockerfile) file with the following:
FROM public.ecr.aws/bitnami/node-snapshot:12

RUN groupadd -r discovery && useradd -r -g discovery discovery

RUN npm config set unsafe-perm true

RUN mkdir /code

WORKDIR /code

COPY package.json .

RUN npm install

COPY src/ src/

CMD ["node", "src/discovery/discovery.js"]
  1. Go to the AWS Perspective repository in ECR in you account and click View push commands and follow the instructions in the dialog box that appears. These commands must be ran in the same directory as the Discovery process Docker file (source/backend/discovery/Dockerfile).

This is will be fixed in the new 1.1.0 release and this workaround will no longer be required.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
itsgsuryacommented, Dec 10, 2020

I have seen the info “This is will be fixed in the new 1.1.0 release and this workaround will no longer be required.”

how can I roll out the new version on my infrastructure? do we have step by step doc?

1reaction
svozzacommented, Dec 31, 2020

Not a problem! Don’t hesitate to ask any more questions too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

3 Ways to overcome the Docker Hub pull rate limit
Up to 5.000 pulls per day for authenticated users of paying customers; unlimited for anonymous users. At first glance, 100/200 pulls per 6...
Read more >
How to work around Docker's new download rate limit on Red ...
Docker recently changed its policy for downloading images as an anonymous user. The company now has a limit of 100 downloads every six...
Read more >
Download rate limit - Docker Documentation
Docker Hub limits the number of Docker image downloads (“pulls”) based on the account type of the user pulling the image. Pull rates...
Read more >
Dealing with Docker Hub Rate Limiting
Dealing with Docker Hub Rate Limiting · Anonymous users can pull 100 images in six hours. · Authenticated users can pull 200 images...
Read more >
How to overcome Docker Hub rate limits in Github Actions
For organizations already on AWS, pull through caching is a good solution to avoid Docker Hub rate limits without incurring additional ...
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