From db687ff4851646d4c44154ca5bdf888dd063fd68 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Fri, 21 Aug 2020 04:55:28 -0400 Subject: [PATCH] Add --runtime-root to ctr Signed-off-by: Michael Crosby --- cmd/ctr/commands/run/run_unix.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/ctr/commands/run/run_unix.go b/cmd/ctr/commands/run/run_unix.go index 45b8781ab..8ab81c4e0 100644 --- a/cmd/ctr/commands/run/run_unix.go +++ b/cmd/ctr/commands/run/run_unix.go @@ -42,6 +42,10 @@ var platformRunFlags = []cli.Flag{ Name: "runc-binary", Usage: "specify runc-compatible binary", }, + cli.StringFlag{ + Name: "runc-root", + Usage: "specify runc-compatible root", + }, cli.BoolFlag{ Name: "runc-systemd-cgroup", Usage: "start runc with systemd cgroup manager", @@ -263,6 +267,9 @@ func getRuncOptions(context *cli.Context) (*options.Options, error) { } runtimeOpts.SystemdCgroup = true } + if root := context.String("runc-root"); root != "" { + runtimeOpts.Root = root + } return runtimeOpts, nil }