opencontainers / opencontainers/runc
[rfc] crun extension compatibility
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Description
We've had a fair few requests from folks about the run.oci.* extensions and why runc doesn't support them. Given that some of these extensions are likely not going to be put into the runtime-spec (run.oci.keep_original_groups was suggested some time ago in opencontainers/runtime-spec#1020 but the core feature is basically a security anti-feature).
The two main features I see requests for quite often are:
-
run.oci.keep_original_groupswhich lets you disable thesetgroupsstep when using rootless containers withnewgidmap. This lets the container access host groups (which is usually a security issue) which then allows you to access the GPU if the original user had access to thevideogroup.podmanhas a magic flag to let you use this, but obviously it only works withcrunat the moment since it's controlled by a non-standard annotation (benefits of vertical integration, I guess you could say). -
run.oci.handleris a generic mechanism forcrunto run non-standard container workloads rather than doing a straight-forwardexecof a binary. In particularrun.oci.handler=wasmcausescrunto run WASM code in the context of thepid1through various WASM runtimes directly (cruncan be compiled with wasm support, where a wasm runtime library is linked intocrunand thencrunruns the runtime on the target.wasmor.w. I'm a little worried that it seems that nobody can agree on what WASM runtime should be used (andcrunitself supports four different runtimes AFAICS) but we could do something minimal with https://github.com/tetratelabs/wazero to see how many users want this feature.
Though there are probably others.
What should the policy be for supporting these? My view is that if users need these features we should support them even if they're non-standard because the alternative is that folks switch to crun. (One obvious point of confusion is that crun has called the annotations run.oci.* which users might think means they are official OCI annotations -- obviously only org.opencontainers.* annotations are official but that doesn't really help with public perception.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the two proposed extensions in the issue: run.oci.keep_original_groups and run.oci.handler, along with runtime-spec#1020 and the referenced wazero option. Compare the requested behavior with runc's current OCI annotation and runtime entry points. Done means an agreed policy and a defined implementation scope, since this RFC does not identify files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, wasm
- Domain
- cli, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100