Merge pull request #1814 from stevvooe/panic-client-fix-oci-spec
oci: allocate process if not already set
This commit is contained in:
commit
9e04cff8e9
@ -89,6 +89,11 @@ func WithImageConfig(image Image) SpecOpts {
|
||||
default:
|
||||
return fmt.Errorf("unknown image config media type %s", ic.MediaType)
|
||||
}
|
||||
|
||||
if s.Process == nil {
|
||||
s.Process = &specs.Process{}
|
||||
}
|
||||
|
||||
s.Process.Env = append(s.Process.Env, config.Env...)
|
||||
cmd := config.Cmd
|
||||
s.Process.Args = append(config.Entrypoint, cmd...)
|
||||
|
Loading…
Reference in New Issue
Block a user