podman icon indicating copy to clipboard operation
podman copied to clipboard

Add way to specify `--runtime-flag` in `containers.conf`

Open dseomn opened this issue 8 months ago • 4 comments

Feature request description

I couldn't find any way to specify the --runtime-flag flag in containers.conf, and from https://github.com/containers/podman/discussions/20228 it looks like it wasn't possible as of 2023-10-03. Could an option be added to containers.conf that does the same thing as --runtime-flag please?

Suggest potential solution

No response

Have you considered any alternatives?

https://github.com/google/gvisor/issues/11543#issuecomment-2719738152 suggested creating a wrapper script, which containers.conf could then reference, I think. That would work, but an option in containers.conf would be easier.

Additional context

No response

dseomn avatar Mar 13 '25 03:03 dseomn

we already have cgroups=disabled for doing something similar. I think we need to map that option to --ignore-cgroups when gvisor is used

giuseppe avatar Mar 13 '25 11:03 giuseppe

Makes sense. I still think an equivalent of --runtime-flag would be nice too, in case the user wants to pass other flags. E.g., in https://github.com/google/gvisor/issues/11543#issuecomment-2719803292 I also had to pass --runtime-flag=network=none to get it working. In that particular example, maybe podman's --network should also be mapped to runsc's --network, but there will probably always be more times when it's useful to specify a runtime flag directly, right?

dseomn avatar Mar 13 '25 17:03 dseomn

sure, that is something we can add. I've nothing against it.

Interested to open a PR to expose the setting?

giuseppe avatar Mar 18 '25 09:03 giuseppe

I don't know go, I already got this working for myself with a wrapper script around runsc (https://github.com/dseomn/dotfiles/commit/8ba58540735f2a60e908fdcbabe7911752b37a52 in case anybody wants to do the same thing), and my backlog of open source stuff I want to contribute to is getting longer than I'd like. So at the moment I'm not interested in making a PR, but that might change after I finish some of the things I've already started.

dseomn avatar Mar 18 '25 18:03 dseomn

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Apr 18 '25 00:04 github-actions[bot]

Hello, I am a UT Austin student interested on working on this issue. Could you please assign it to me?

1AlexBunea avatar Nov 13 '25 18:11 1AlexBunea