Docker Hub Rate Limiting Workaround
See original GitHub issueDescription
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.
- Clone the Perspective repository:
git clone git@github.com:awslabs/aws-perspective.git
- Enter the AWS Perspective directory
cd aws-perspective
- Enter the Discovery process code directory
cd source/backend/discovery
- 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"]
- 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:
- Created 3 years ago
- Reactions:4
- Comments:15 (7 by maintainers)
Top GitHub Comments
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?
Not a problem! Don’t hesitate to ask any more questions too.