diff options
Diffstat (limited to 'pkg/specgen/generate/container.go')
-rw-r--r-- | pkg/specgen/generate/container.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/specgen/generate/container.go b/pkg/specgen/generate/container.go index 63caaa77c..d8008b10b 100644 --- a/pkg/specgen/generate/container.go +++ b/pkg/specgen/generate/container.go @@ -3,6 +3,7 @@ package generate import ( "context" "encoding/json" + "fmt" "os" "strings" "time" @@ -352,7 +353,10 @@ func ConfigToSpec(rt *libpod.Runtime, specg *specgen.SpecGenerator, contaierID s if err != nil { return nil, nil, err } - conf := c.Config() + conf := c.ConfigWithNetworks() + if conf == nil { + return nil, nil, fmt.Errorf("failed to get config for container %s", c.ID()) + } tmpSystemd := conf.Systemd tmpMounts := conf.Mounts |