I tried using ECR Public instead of Docker Hub (Docker Hub Download Rate Limit measures)

Summary

I got stuck on Docker Hub while building Docker with CodeBuild. It was easy to get around with the new AWS service ECR Public.

Event

When I tried to build a Docker container with ubuntu as the base image with CodeBuild, the following error occurred.

error pulling image configuration: toomanyrequests: Too Many Requests. Please see https://docs.docker.com/docker-hub/download-rate-limit/

Research

Docker Hub has recently set a limit on the number of downloads. The number of downloads is limited for each global IP/account (if you log in). The article by Class Method is detailed. Build fails with “Too Many Requests.”…. Log in to Docker Hub to avoid IP gachas on AWS CodeBuild! Story

Correspondence

(I thought that Docker Hub authentication was troublesome ...) Just because AWS started to provide a service ECR Public that is an alternative to Docker Hub, I decided to use this.

[Breaking News] AWS Launches "Amazon Elastic Container Registry Public" Aiming to Replace Docker Hub. AWS re: Invent 2020 AWS announces alternative service for Docker Hub. You can publish the container image to the public, free up to 50GB, you can pull as many times as you want from AWS

Compared to the pattern of putting authentication in Docker Hub,

I decided that there is a merit.

When you access ECR Public, it seems that the main official images are registered. (I haven't confirmed everything)

image.png

Since there is an ImageURI (the tag structure is the same as DockerHub), just rewrite from of DockerFile.

FROM public.ecr.aws/ubuntu/ubuntu:bionic

Apparently, exactly the same thing as Docker Hub is hosted (it was the same hash, Docker cache also worked), and it worked just by rewriting it.

When I looked at the nginx Docker repository, there was a script that automatically pushes to ECR Public.

Summary

I've only used it for a while, but it seems that ECR Public can be used as an alternative to Docker Hub as an official image source. Especially if you are using the AWS environment, it seems to be especially useful because there are no particular restrictions.

Recommended Posts

I tried using ECR Public instead of Docker Hub (Docker Hub Download Rate Limit measures)
I tried using GoogleHttpClient of Java
I tried using Scalar DL with Docker
I tried using Docker for the first time
I tried using the profiler of IntelliJ IDEA
I tried using the Server Push function of Servlet 4.0
I tried to summarize the state transition of docker
I tried using Docker Desktop for Windows on Windows 10 Home
[WIP] I tried the configuration of Docker + Streama + NFS
Check the rate limit application status of docker pull
Checked Docker Hub's Download rate limit on Circle CI
I tried to build an environment using Docker (beginner)
I tried using TestNG
I tried using Galasa
I tried to build the environment little by little using docker
I tried to build the environment of WSL2 + Docker + VSCode
I tried using Android's open source file download manager Fetch
Getting Started with GitHub Container Registry instead of Docker Hub