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

Jib should read the Docker environment variables and daemon.json #1551

Closed
briandealwis opened this issue Mar 12, 2019 · 8 comments
Closed

Jib should read the Docker environment variables and daemon.json #1551

briandealwis opened this issue Mar 12, 2019 · 8 comments

Comments

@briandealwis
Copy link
Member

Jib should seed itself with Docker configuration when available.

Environment

The docker-provided inspectDockerImage tool supports the following environment variables:

  • DOCKER_REGISTRY_AUTH_ENDPOINT, defaults to https://registry-1.docker.io
  • DOCKER_REGISTRY_API_ENDPOINT, defaults to https://auth.docker.io

daemon.json

The Docker daemon.json file configures:

The daemon.json file lives at:

  • /etc/docker/daemon.json on Linux
  • %ProgramData%\docker\config\daemon.json on Windows
  • ~/.docker/daemon.json on macOS (not documented, but it's there)
@Eveneko

This comment has been minimized.

@chanseokoh

This comment has been minimized.

@loosebazooka loosebazooka modified the milestones: v2.3.0, v2.4.0 May 19, 2020
@chanseokoh chanseokoh modified the milestones: v2.4.0, v2.5.0 Jun 12, 2020
@chanseokoh chanseokoh modified the milestones: v2.5.0, v2.6.0 Aug 7, 2020
@chanseokoh chanseokoh modified the milestones: v2.6.0, v2.7.0 Oct 13, 2020
@PavelGloba
Copy link

Since dockerhub introduced the pull limits, this closed issue is now relevant.
It should be covered by reading daemon.json, but the milestone for it is constantly changing. It would be great if registry-mirror feature could be prioritized.

@chanseokoh
Copy link
Member

chanseokoh commented Dec 1, 2020

@PavelGloba as mentioned in #1396 (comment), you can simply point your base image to your registry mirror. Hence we don't see registry-mirrors as a high priority feature but basically something cool to have. UPDATE: wrong. --registry-mirrors must be supported by Jib: #1396 (comment)

Mind to explain to us why you'd like to have Jib follow the same workflow that the Docker daemon goes through regarding registry-mirrors?

@PavelGloba
Copy link

PavelGloba commented Dec 2, 2020

@chanseokoh Well, the reason is the same as why registry-mirrors exists in daemon.json
You can set it once in one place instead of pointing every image that you use to your mirror. That's not an issue if you have one project with one base image, but on a large scale it's becoming a problem.
Also, you can set up multiple mirrors there for failover.

@chanseokoh
Copy link
Member

Reopened #1396 about the registry-mirror support.

@chanseokoh
Copy link
Member

@PavelGloba to better support the users hitting the Docker Hub rate limiting, we implemented the registry mirror feature, which is now live with the Jib 2.8.0 release. Check out this FAQ to learn how to configure it.

@chanseokoh chanseokoh removed this from the v2.8.0 milestone Feb 24, 2021
@mpeddada1
Copy link
Contributor

mpeddada1 commented Aug 5, 2022

Closing issue as registry-mirror support is now available in the plugins and Jib CLI through a global config file (see README). Please re-open if this feature is still relevant.

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

6 participants