containers / containrs

General purpose container library
Apache License 2.0
123 stars 21 forks source link

Consider OCI runtime plugin mechanism #25

Open saschagrunert opened 3 years ago

saschagrunert commented 3 years ago

The idea is not only to support CLI based OCI runtimes but also provide an easy-to-use middle layer (maybe based on C bindings to be mostly language Independent). WDYT?

Klaven commented 3 years ago

would it need to be a middle layer, or just something like ctor? when I hear "middle layer" I think of docker shim :)

saschagrunert commented 3 years ago

Depends a bit on the question at which level we want to provide such an interface. Right now we build a Sandbox on top of a flexible Pod trait: https://github.com/cri-o/cri/blob/29f6f7fce7bbc752052d1b70e897b785c02f38c0/src/sandbox/mod.rs#L48-L70

Being able to exchange it via a plugin mechanism rather than moving the code into this repo seems quite useful. OTOH we can also provide an API that users can build their own Kubernetes CRI binary (then only in Rust)…