Skip to content

Commit

Permalink
config: Add config entry for ocijail
Browse files Browse the repository at this point in the history
Another experimental OCI runtime for FreeBSD, similar to runj but with
a focus on podman/buildah compatiblity.

Signed-off-by: Doug Rabson <dfr@rabson.org>
  • Loading branch information
dfr committed Oct 19, 2022
1 parent 5c33992 commit 048e046
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ image_copy_tmp_dir="storage"`
"/usr/bin/krun",
"/usr/local/bin/krun",
},
"ocijail": {
"/usr/local/bin/ocijail",
},
}

pluginDirs := []string{
Expand Down
3 changes: 3 additions & 0 deletions pkg/config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 048e046

Please sign in to comment.