diff options
-rw-r--r-- | runsc/container/container.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runsc/container/container.go b/runsc/container/container.go index 15c445754..21a01b5de 100644 --- a/runsc/container/container.go +++ b/runsc/container/container.go @@ -311,7 +311,10 @@ func New(conf *boot.Config, args Args) (*Container, error) { if isRoot(args.Spec) { log.Debugf("Creating new sandbox for container %q", args.ID) - if args.Spec.Linux != nil && args.Spec.Linux.CgroupsPath == "" { + if args.Spec.Linux == nil { + args.Spec.Linux = &specs.Linux{} + } + if args.Spec.Linux.CgroupsPath == "" { args.Spec.Linux.CgroupsPath = "/" + args.ID } |