Set Entrypoint from image only if not already set

Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #827
Approved by: rhatdan
This commit is contained in:
Matthew Heon
2018-05-24 10:19:32 -04:00
committed by Atomic Bot
parent 915364034f
commit b09fca74af

View File

@ -242,8 +242,10 @@ func (c *Container) setupStorage(ctx context.Context) error {
}
// Set the default Entrypoint and Command
c.config.Entrypoint = containerInfo.Config.Config.Entrypoint
if len(c.config.Command) == 0 {
if c.config.Entrypoint == nil {
c.config.Entrypoint = containerInfo.Config.Config.Entrypoint
}
if c.config.Command == nil {
c.config.Command = containerInfo.Config.Config.Cmd
}