diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_internal.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index f3f11f945..c41d81a2b 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -483,12 +483,13 @@ func (c *Container) setupStorage(ctx context.Context) error { // Set the default Entrypoint and Command if containerInfo.Config != nil { + // Set CMD in the container to the default configuration only if ENTRYPOINT is not set by the user. + if c.config.Entrypoint == nil && c.config.Command == nil { + c.config.Command = containerInfo.Config.Config.Cmd + } if c.config.Entrypoint == nil { c.config.Entrypoint = containerInfo.Config.Config.Entrypoint } - if c.config.Command == nil { - c.config.Command = containerInfo.Config.Config.Cmd - } } artifacts := filepath.Join(c.config.StaticDir, artifactsDir) |