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

Allow config to change default repo #9954

Open
sondavidb opened this issue Mar 8, 2024 · 0 comments
Open

Allow config to change default repo #9954

sondavidb opened this issue Mar 8, 2024 · 0 comments

Comments

@sondavidb
Copy link

What is the problem you're trying to solve

Stemmed from containerd/nerdctl#2843.

We had an issue open in nerdctl where a user wished to set a default repository when a domain name is not set, mentioning that this is configurable in docker. This value is currently hardcoded as docker.io. I would like this to be configurable.

Describe the solution you'd like

A configurable option in a config file to get this behavior.

Additional context

I would like to drive this PR, but I'd like a bit more clarity on a few problems I saw while attempting to gauge effort and feasibility for myself:

  1. Per Ahikiro's comment on the above issue, this should probably be configurable in the hosts.toml file, providing the documentation where similar logic lives. Should a user wish to set a default repo, I'm imagining they put it in certs.d/_default/hosts.toml with something like the following:
default_repo = "https://example.com"

This is the bare minimum that I would like to work for registries with no authentication or other verification. Please let me know if this is the correct way of approaching this.

  1. I see that containerd 2.0 has moved the reference folder to its own repository: https://github.com/distribution/reference. In this case, I'm unsure if it is possible to override the default as it now lives in its own library, and we do not have access to this defaultDomain variable. Pull on its own does not qualify the reference, and it seems to be the responsibility of the caller to qualify the reference before calling Pull(). I wonder if this would also necessitate a contribution to distribution/reference?
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

1 participant