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

feat: support multiple registry mirrors with fallback #1498

Merged
merged 2 commits into from Dec 9, 2020

Conversation

vbehar
Copy link
Contributor

@vbehar vbehar commented Nov 20, 2020

Fixes #1473

Description

The initial implementation of the registry mirror only allowed a single mirror, and if pulling from the mirror failed, the build would fail.

This change introduces:

  • multiple registry mirrors instead of a single one
  • fallback if an image can't be pulled from a registry

This is the same behavior as the docker daemon and will allow using a registry mirror such as mirror.gcr.io which is incomplete and doesn't have all the content that the default registry on docker.io has.

Note that there are no changes in the CLI flags, the --registry-mirror flag is still valid. But now it can be used multiple times to set up more than one registry mirror.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes unit tests
  • Adds integration tests if needed.

See the contribution guide for more details.

Reviewer Notes

  • The code flow looks good.
  • Unit tests and or integration tests added.

Release Notes

Describe any changes here so maintainer can include it in the release notes, or delete this block.

- `--registry-mirror` can now be used more than once to set up more than one registry mirror, with fallback if an image can't be found on one mirror.

@google-cla google-cla bot added the cla: yes CLA signed by all commit authors label Nov 20, 2020
Fixes GoogleContainerTools#1473

The initial implementation of the registry mirror only allowed a single mirror, and if pulling from the mirror failed, the build would fail.

This change introduces:
- multiple registry mirrors instead of a single one
- fallback if an image can't be pulled from a registry

This is the same behavior as the docker daemon and will allow using a registry mirror such as `mirror.gcr.io` which is incomplete and doesn't have all the content that the default registry on docker.io has.

Note that there are no changes in the CLI flags, the `--registry-mirror` flag is still valid. But now it can be used multiple times to set up more than one registry mirror.
@vbehar
Copy link
Contributor Author

vbehar commented Dec 1, 2020

@tejal29 hi, do you think you might have time to review this PR? or maybe someone else? thanks a lot!

@tejal29 tejal29 merged commit 131828a into GoogleContainerTools:master Dec 9, 2020
@tejal29
Copy link
Member

tejal29 commented Dec 9, 2020

Thanks @vbehar. Unfortunately i am the only active maintainer. Would love to onboard new maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes CLA signed by all commit authors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

if registry mirror does not have it, can you default it to index.docker.io
2 participants