From b09fca74afd12b25f18ae92cbdce19fc625704b1 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 24 May 2018 10:19:32 -0400 Subject: Set Entrypoint from image only if not already set Signed-off-by: Matthew Heon Closes: #827 Approved by: rhatdan --- libpod/container_internal.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libpod/container_internal.go b/libpod/container_internal.go index b33ac78e8..9896d0ed7 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -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 } -- cgit v1.2.3-54-g00ecf