storage icon indicating copy to clipboard operation
storage copied to clipboard

Can't set comma-separated option value via `STORAGE_OPTS`

Open shvchk opened this issue 2 years ago • 0 comments

Consider the following storage.conf:

#...

[storage.options.overlay] 
mountopt = "nodev,volatile"

What would be the STORAGE_OPTS env var equivalent?

STORAGE_OPTS uses , to separate options, so one would expect that either quoting (STORAGE_OPTS="overlay.mountopt='nodev,volatile'") or escaping (STORAGE_OPTS="overlay.mountopt=nodev\,volatile") would work, but neither does.

Quick way to check (yeah, I know volatile is default for --rm anyway):

STORAGE_OPTS="overlay.mountopt='nodev,volatile'" podman run --rm -it alpine
Error: unable to parse key/value option: volatile

Relevant line: https://github.com/containers/storage/blob/6902c2df7cca56b02e15cbe3653f59ee14c8c1b3/types/options.go#L337

shvchk avatar Aug 26 '23 01:08 shvchk