Closed gabyx closed 8 months ago
that is by design, when you change the --root
to use, we cannot assume the additional stores are compatible with the graph driver currently in use. You need to pick the options you'd like to use with --storage-opt
.
@giuseppe :
Thanks I just realized that, is there an option for podman
to use a file as storage-opts
basically saying use the same file again --storage-opts-file /etc/containers/storage.conf
?
I just wanted to change the root to have some isolation in nesting containers:
https://github.com/containers/podman/discussions/22049#discussioncomment-8827386
you can use the CONTAINERS_STORAGE_CONF
environment variable to point to a different storage.conf
file
@giuseppe : I guess that this env. variable does not work (on my machine) with
CONTAINERS_STORAGE_CONF=/etc/containers/storage.conf \
podman --root /podman-root/root "$@"
because I guess --root
has precedence and although CONTAINERS_...
has been used its set to empty in the code because of --root
.
But I can of course just make another storage.conf
file and use that instead of doing --root
etc.
Issue Description
Podman: 4.3.9
Run
podman --privileged -v "$HOME/.local/share/containers/storage:/var/lib/shared" --rm -it quay.io/podman:4.3.9 podman --root /whatever images
Does not show any images.podman --privileged -v "$HOME/.local/share/containers/storage:/var/lib/shared" --rm -it quay.io/podman:4.3.9 podman images
Should show all images you have on your systemIts strange that the
additionalimagestores
in/etc/containers/storage.confg
gets ignored when setting--root
? Is that due tographOptions
beeing ignored?https://github.com/containers/podman/blob/main/pkg/domain/infra/runtime_libpod.go#L86
Steps to reproduce the issue
Steps to reproduce the issue
podman --privileged -v "$HOME/.local/share/containers/storage:/var/lib/shared" --rm -it quay.io/podman:4.3.9 podman --root /whatever images
Describe the results you received
No images found.
Describe the results you expected
Images found in
/var/lib/shared
which is mounted.podman info output
Podman in a container
Yes
Privileged Or Rootless
Privileged
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting