oci: allocate process if not already set
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
abeb262d0d
commit
0d957b1da5
@ -89,6 +89,11 @@ func WithImageConfig(image Image) SpecOpts {
|
|||||||
default:
|
default:
|
||||||
return fmt.Errorf("unknown image config media type %s", ic.MediaType)
|
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...)
|
s.Process.Env = append(s.Process.Env, config.Env...)
|
||||||
cmd := config.Cmd
|
cmd := config.Cmd
|
||||||
s.Process.Args = append(config.Entrypoint, cmd...)
|
s.Process.Args = append(config.Entrypoint, cmd...)
|
||||||
|
Loading…
Reference in New Issue
Block a user