Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set comma-separated option value via STORAGE_OPTS #1696

Open
shvchk opened this issue Aug 26, 2023 · 0 comments
Open

Can't set comma-separated option value via STORAGE_OPTS #1696

shvchk opened this issue Aug 26, 2023 · 0 comments

Comments

@shvchk
Copy link

shvchk commented Aug 26, 2023

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:

opts.GraphDriverOptions = append(opts.GraphDriverOptions, strings.Split(os.Getenv("STORAGE_OPTS"), ",")...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant