summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime_pod_infra_linux.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpod/runtime_pod_infra_linux.go b/libpod/runtime_pod_infra_linux.go
index bc37bdb23..c6f268182 100644
--- a/libpod/runtime_pod_infra_linux.go
+++ b/libpod/runtime_pod_infra_linux.go
@@ -225,7 +225,10 @@ func (r *Runtime) createInfraContainer(ctx context.Context, p *Pod) (*Container,
if err != nil {
return nil, err
}
- imageName := newImage.Names()[0]
+ imageName := "none"
+ if len(newImage.Names()) > 0 {
+ imageName = newImage.Names()[0]
+ }
imageID := data.ID
return r.makeInfraContainer(ctx, p, imageName, r.config.Engine.InfraImage, imageID, data.Config)