diff --git a/libcontainer/configs/config.go b/libcontainer/configs/config.go index 22fe0f9b4c1..f416179217e 100644 --- a/libcontainer/configs/config.go +++ b/libcontainer/configs/config.go @@ -480,6 +480,9 @@ func (c Command) Run(s *specs.State) error { Stdout: &stdout, Stderr: &stderr, } + if cmd.Env == nil { + cmd.Env = []string{} + } if err := cmd.Start(); err != nil { return err }