Merge pull request #1199 from dfr/freebsd-config

config: Add config entry for ocijail
This commit is contained in:
OpenShift Merge Robot 2022-10-19 07:37:23 -04:00 committed by GitHub
commit bf46de4bee
3 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -195,6 +195,9 @@ image_copy_tmp_dir="storage"`
"/usr/bin/krun",
"/usr/local/bin/krun",
},
"ocijail": {
"/usr/local/bin/ocijail",
},
}
pluginDirs := []string{

View File

@ -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()