Skip to content

imagestore not picked up correctly when graphroot contains an environment variable? #2389

@livingsilver94

Description

@livingsilver94

This is my storage.conf:

[storage]
driver = "overlay"
graphroot = "$XDG_RUNTIME_DIR/containers"
###imagestore = "$XDG_RUNTIME_DIR/containers"
runroot = "$XDG_RUNTIME_DIR/containers/storage"
transient_store = true

[storage.options]
additionalimagestores = ["/media/containers"]

[storage.options.pull_options]
use_hard_links = "true"

And the error I get is

Error: configure storage: open /media/containers/overlay-images/images.lock: open /media/containers/overlay-images/images.lock: permission denied

It seems podman tries to write into the read-only additional image store because it didn't pick up the correct path of imagestore, that should be equal to the graphroot when unspecified (in fact, it' commented out).

When I uncomment imagestore, it tries to write the $XDG_RUNTIME_DIR and fails, which is fine because the documentation doesn't actually state environment variables are supported for this configuration entry.

Expected behavior

Podman should use $XDG_RUNTIME_DIR/containers (with the envvar resolved) for the image store.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions