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

Support registry-mirrors #1396

Closed
lxg1208 opened this issue Jan 8, 2019 · 7 comments
Closed

Support registry-mirrors #1396

lxg1208 opened this issue Jan 8, 2019 · 7 comments

Comments

@lxg1208
Copy link

lxg1208 commented Jan 8, 2019

Because of the network problems in some countries, the basic image cannot be pulled when build image with Jib. Whether the Jib can support a configuration like "registry-mirrors"?

@loosebazooka
Copy link
Member

Can you explain your usecase.

You can always explicitly set the base image to something that is accessible in your country?

@lxg1208
Copy link
Author

lxg1208 commented Jan 9, 2019

I can't pull images from Docker Hub with Jib most of the time.

@coollog
Copy link
Contributor

coollog commented Jan 9, 2019

Hi @lxg1208 , you can use jib.from.image to specify your own custom image from your desired registry mirror.

@chanseokoh
Copy link
Member

you can use jib.from.image to specify your own custom image from your desired registry mirror.

You can't set jib.from.image to a pull-through mirror. For example, the mirror.gcr.io mirror (the public Google mirror on gcr.io for Docker Hub) doc says

Pulling cached images does not count against Docker Hub rate limits. However, there is no guarantee that a particular image will remain cached for an extended period of time. Only obtain cached images on mirror.gcr.io by configuring the Docker daemon. A request to pull directly from mirror.gcr.io will fail if a cached copy of the image does not exist.

This type of mirrors must be supported internally by Jib, as how --registry-mirror of Docker works.

@chanseokoh chanseokoh added this to the v2.8.0 milestone Jan 8, 2021
@chanseokoh
Copy link
Member

@chanseokoh
Copy link
Member

For Jib Maven/Gradle plugins and Jib Core, this is fixed by #3011 and #2999. (Only public mirrors such as mirror.gcr.io are supported.) The mirror support will be useful when hitting Docker Hub rate limits.

I'll create a separate issue for Jib CLI.

@chanseokoh
Copy link
Member

@lxg1208 Jib build plugins 2.8.0 is live with the feature to configure registry mirrors. It should be useful to avoid hitting the Docker Hub rate limiting. Check out this FAQ to learn how to configure it.

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

No branches or pull requests

4 participants