Skip to content

Commit

Permalink
Fix the --runtime option of container create is ignored
Browse files Browse the repository at this point in the history
Signed-off-by: Kay Yan <[email protected]>
  • Loading branch information
yankay committed Aug 7, 2023
1 parent 9cd00de commit 9bbe3ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/cmd/container/run_runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package container

import (
"context"
"path/filepath"
"strings"

"github.com/containerd/containerd"
Expand Down Expand Up @@ -47,9 +48,9 @@ func generateRuntimeCOpts(cgroupManager, runtimeStr string) ([]containerd.NewCon
}
runtimeOpts = nil
}
} else {
} else if filepath.IsAbs(runtimeStr) {
// runtimeStr is a runc binary
runcOpts.BinaryName = runtimeStr
runtime = runtimeStr
}
}
o := containerd.WithRuntime(runtime, runtimeOpts)
Expand Down

0 comments on commit 9bbe3ea

Please sign in to comment.