summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpod/container_internal.go6
1 files 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
}