was trying to summarize the possibilities for config files:
- mounts.conf
- storage.conf
- libpod.conf
and ended up falling into a maze of twisty passages, all alike. (all
this is based on packaged podman-1.7.0 on fedora 31).
first, from "man podman", those three files are explained thusly:
libpod.conf (/usr/share/containers/libpod.conf)
libpod.conf is the configuration file for all tools using libpod to
manage containers, when run as root. Administrators can override the
defaults file by creating `/etc/containers/libpod.conf`. When Podman
runs in rootless mode, the file `$HOME/.config/containers/libpod.conf`
is created and replaces some fields in the system configuration file.
mounts.conf (/usr/share/containers/mounts.conf)
The mounts.conf file specifies volume mount directories that are
automatically mounted inside containers when executing the `podman
run` or `podman start` commands. Administrators can override the
defaults file by creating `/etc/containers/mounts.conf`.
When Podman runs in rootless mode, the file $HOME/.config/con‐
tainers/mounts.conf will override the default if it exists.
Please refer to containers-mounts.conf(5) for further details.
storage.conf (/etc/containers/storage.conf)
storage.conf is the storage configuration file for all
tools using containers/storage
When Podman runs in rootless mode, the file
`$HOME/.config/containers/storage.conf` is used instead of the system
defaults.
so the first inconsistency(?) is that the first two files have a
possibly default version under /usr/share/containers, while
storage.conf does not -- according to "man podman", the default file
will be in /etc/containers. it's not clear why the inconsistency.
the next oddity is that the first two files are contributed by two
different fedora packages:
$ rpm -qf /usr/share/containers/libpod.conf
podman-1.7.0-2.fc31.x86_64
$ rpm -qf /usr/share/containers/mounts.conf
containers-common-0.1.40-4.fc31.x86_64
that may not sound like a big deal but it does allow for some
inconsistency in how those two packages either supply or explain
things, which is what you see when you "man containers-storage.conf":
Distributions often provide a /usr/share/containers/stor‐
age.conf file to define default storage configuration. Adminis‐
trators can override this file by creating /etc/contain‐
ers/storage.conf to specify their own configuration. The stor‐
age.conf file for rootless users is stored in the $HOME/.con‐
fig/containers/storage.conf file.
so "man podman" does *not* mention the possibility of
/usr/share/containers/storage.conf, while "man
containers-storage.conf" *does*.
finally, i thought, "oh, just RTFS" to see what is really happening,
and in libpod/config/config.go (amd i am *not* a go expert), it seems
like libpod.conf is supported being under /usr/share/containers, but i
don't see where the other two files (mounts.conf, storage.conf) are
similarly supported, although i could be just misreading badly.
i'm just trying to clarify the configuration file possibilities.
rday