-
Notifications
You must be signed in to change notification settings - Fork 782
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 overriding registries.conf and registries.d paths #2002
Comments
Thanks for your report. There’s a hidden |
Does it affect the /etc/containers/registries.conf.d/ as well? Under Ubuntu, the /etc/containers/registries.conf consists of comments only, thus it is effectively empty. Not using it wouldn't help. Does the --registries.d option add an additional directory to read, or does it replace the path? |
(Note that
Alternatively, you can create a (potentially empty) per-user config file in |
Creating an empty ~/.config/containers/registries.conf makes it work. But I guess that having this file makes other programs like podman stop using the mirror as well. |
A friendly reminder that this issue had no activity for 30 days. |
So what is the intended way to fill a local mirror with images without such workarounds? |
A friendly reminder that this issue had no activity for 30 days. |
I think the root of the issue can lie in an implicit root requirement introduced by assuming that Skopeo has read access to ~/ . If it is granted such access, and it fails to find the file, it does not complain or initialize the above file populating it with some defaults. It just does nothing. So checking for the presence of this file may not even be needed at all, and at least the reaction of Skopeo to not finding this file (e.g. due to not having read access to To reproduce the issue:
vs. masking the problem by using the correct user ID (1007) with access rights
Notice that the missing registries config file has not been created during the second successful Skopeo run above, despite having write access to the container and host
|
Sure; that’s ordinary for per-user config files.
There are many possible ways for that access to fail, including disk corruption, or a Really, the direct solution is to allow overriding the path to |
Hi,
using skopeo 1.4.1 under Ubuntu 22.04 I ran into that problem:
For a network I've set on all linux machines in /etc/containers/registries.conf.d/something.conf
[[registry]]
prefix = "docker.io"
location = "docker.io"
[[registry.mirror]]
prefix = "docker.io"
location = "install.local:5000/docker.io"
Then I have a sync_install.yaml file which contains a list of containsers to be synchronized like
docker.io:
images:
... and some more
But when trying to copy with
skopeo sync --scoped --src yaml --dest docker /etc/containers/sync_install.yaml install.local:5000
it doesn't (checked with strace) the source docker.io at all, but takes the local mirror to synchronize it with itself and comes to the conclusion "Skipping: image already present at destination"
I have to remove /etc/containers/registries.conf.d/something.conf in order to make skopeo work correctly, i.e. connect to docker.io instead of my local mirror.
It doesn't make sense to synchronize a local mirror just with itself. And I did not find any option to not use the mirror.
Any solution (instead of removing the file, which requires root privileges)?
regards
The text was updated successfully, but these errors were encountered: