From 048e0460e02a9a6e1d91cef5ee7dc6cf8e781e47 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Wed, 5 Oct 2022 08:35:54 +0100 Subject: [PATCH] config: Add config entry for ocijail Another experimental OCI runtime for FreeBSD, similar to runj but with a focus on podman/buildah compatiblity. Signed-off-by: Doug Rabson --- pkg/config/config.go | 2 +- pkg/config/config_test.go | 3 +++ pkg/config/default.go | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index cc2f178b6..92488f072 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -843,7 +843,7 @@ func (m *MachineConfig) URI() string { func (c *EngineConfig) findRuntime() string { // Search for crun first followed by runc, kata, runsc - for _, name := range []string{"crun", "runc", "runj", "kata", "runsc"} { + for _, name := range []string{"crun", "runc", "runj", "kata", "runsc", "ocijail"} { for _, v := range c.OCIRuntimes[name] { if _, err := os.Stat(v); err == nil { return name diff --git a/pkg/config/config_test.go b/pkg/config/config_test.go index 890cdfa3b..04b290b8f 100644 --- a/pkg/config/config_test.go +++ b/pkg/config/config_test.go @@ -195,6 +195,9 @@ image_copy_tmp_dir="storage"` "/usr/bin/krun", "/usr/local/bin/krun", }, + "ocijail": { + "/usr/local/bin/ocijail", + }, } pluginDirs := []string{ diff --git a/pkg/config/default.go b/pkg/config/default.go index 6e370102f..4a3d37fd9 100644 --- a/pkg/config/default.go +++ b/pkg/config/default.go @@ -368,6 +368,9 @@ func defaultConfigFromMemory() (*EngineConfig, error) { "/usr/bin/krun", "/usr/local/bin/krun", }, + "ocijail": { + "/usr/local/bin/ocijail", + }, } // Needs to be called after populating c.OCIRuntimes. c.OCIRuntime = c.findRuntime()