summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index bea7acd69..872802016 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -337,11 +337,13 @@ func (c *Container) setupStorage(ctx context.Context) error {
}
// Set the default Entrypoint and Command
- if c.config.Entrypoint == nil {
- c.config.Entrypoint = containerInfo.Config.Config.Entrypoint
- }
- if c.config.Command == nil {
- c.config.Command = containerInfo.Config.Config.Cmd
+ if containerInfo.Config != nil {
+ 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)