I was wondering how do I either disable the automatic creation of, or the use of the files that contain [alias] sections for image shortname aliases.
For example, /etc/containers/registries.conf.d/000-shortnames.conf
or ~/.cache/containers/short-name-aliases.conf
I have edited /etc/containers/registries.conf
to use the registries that I want,
unqualified-search-registries = ["example.com", "notquay.io"]
however, as an example if I do:
podman pull hello-world
It still pulls the quay.io/podman/hello
image.
If I delete /etc/containers/registries.conf.d/000-shortnames.conf
then it works as I want, but I’m guessing that it is automatically created? And figuring it is a matter of time before the file is automatically regenerated.
Things I’ve tried (but realized are wrong)
Initially, I read this: Container image short names in Podman and heavily misunderstood it.
I set short-name-mode = "disabled"
in /etc/containers/registries.conf
but then when I read man containers-registries.conf
I realized that it is fine to leave the default enforcing
and it does not seem to have anything to do with what I want.
I also thought that I needed to add this to any of the containers.conf files (which I did)
[engine]
env=["CONTAINERS_SHORT_NAME_ALIASING=off"]
But I’m guessing it is the exact same misunderstanding as the short-name-mode because neither of these do what I want.
So, I’m not sure what I should be doing to get this to work how I would like it to.
Which is, when I attempt to pull a non-fully-qualified image, only attempt to pull from the registries I configured, rather than the auto-generated shortname alias files.
Thanks for reading!