Support custom OCI spec options in containerd executor#6206
Support custom OCI spec options in containerd executor#6206Vigilans wants to merge 1 commit intomoby:masterfrom
Conversation
Signed-off-by: Vigilans <vigilans@foxmail.com>
tonistiigi
left a comment
There was a problem hiding this comment.
I think I'd prefer if we add bool for hyperv isolation instead, so nobody gets ideas to use this for something that we wouldn't like (for example, changing the security sandbox).
|
I guess the hyperv isolation mode should also be exposed in toml config (@profnandaa @gabriel-samfira) |
Should moby's Isolation type introduced into buildkit? // Isolation modes for containers
const (
IsolationEmpty Isolation = "" // IsolationEmpty is unspecified (same behavior as default)
IsolationDefault Isolation = "default" // IsolationDefault is the default isolation mode on current daemon
IsolationProcess Isolation = "process" // IsolationProcess is process isolation mode
IsolationHyperV Isolation = "hyperv" // IsolationHyperV is HyperV isolation mode
)
I initially modified moby's vendor buildkit package to pass daemon's isolation type to buildkit executor, which just works like the boolean way, but with some more info (isolation mode string vs boolean). However, since buildkit repository itself does not include |
|
Iiuc then in the containerd/oci level this is just passed with |
|
In daemon's isolation mode there's only process and hyperv. |
|
We shouldn't care about the extra wrapping or type definitions in Moby. If this is a bool in containerd then we should have a bool as well. We don't need to invent extra logic for this capability, just pass the value to containerd libs. |
|
This PR is inherited from moby/moby#50942 in buildkit side.
We expose
SpecOptsinExecutorOptionsto allow downstream user to provide custom OCI spec options when creating containers.