Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker registry as a pull through cache with AWS ECR repository #4252

Open
fti-sshendre opened this issue Jan 12, 2024 · 0 comments
Open

Docker registry as a pull through cache with AWS ECR repository #4252

fti-sshendre opened this issue Jan 12, 2024 · 0 comments

Comments

@fti-sshendre
Copy link

Description

We are hosting a private docker registry in AWS ECR and we have development team in several sites around the world.
Having a docker pull through cache would help to reduce the time each engineer spend trying to pull down the image
from the AWS cloud to their local site (basically, all engineer at one site will share the same cache so if an
image is already pulled, it will be served directly from the local cache).

Lets consider there are two machines as follows:

  • Machine A (Has a local registry)
  • Machine B (Client machine, from where we will pull an images)

I am trying to setup an environment as follows:

  • Docker pull request will be send to "Machine A" (local registry) from "Machine B" (client machine).
  • I am expecting that, "Machine A" should check the differences between an images from the local registry and remote
    repositories (AWS ECR Private Registry in my case).
  • If there is any difference in requested image then it will fetch from remote repository otherwise it will pull from local registry.

[Diagramatic view is attached for reference]
Diagram

I have tried following approaches to make it work according to docker documentation:

  • Added following configuration in /etc/registry/config.yml in "Machine A" (local registry):
proxy:
    remoteurl: https://<your-ecr-registry>.dkr.ecr.<region>.amazonaws.com
    username: <username>
    password: <your-ecr-authorization-token>
  • Added following configuration in /etc/docker/daemon.json in "Machine B" (client machine):
{
    "registry-mirror": ["https://<my-docker-mirror-host>"]
}

After using above approach, I am getting manifest unknown error on "Machine B" (client machine). It means, my local registry is unable to fetch requested docker image from AWS ECR (remote repository).

Any related information or insights related to the steps outlined above would be highly beneficial for a comprehensive understanding and troubleshooting of the proxy configuration in the Docker environment for ECR Private Registry.

I found some issues reported regarding above. But unfortunately, I did not find any solution to achieve my requirement.

I have attached some reference links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant