Forward containerd debug to shim invocation

Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
This commit is contained in:
Justin Terry (VM)
2018-09-26 13:49:53 -07:00
parent f88d3e5d6d
commit 84aa0bfde6
4 changed files with 62 additions and 3 deletions

View File

@@ -160,8 +160,13 @@ func (s *service) StartShim(ctx context.Context, id, containerdBinary, container
"-address", containerdAddress,
"-publish-binary", containerdBinary,
"-socket", socketAddress,
"-debug",
}
opts, ok := ctx.Value(shim.OptsKey{}).(shim.Opts)
if ok && opts.Debug {
args = append(args, "-debug")
}
cmd := exec.Command(self, args...)
cmd.Dir = cwd
cmd.Env = append(os.Environ(), "GOMAXPROCS=2")