summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-05-06 16:08:47 -0400
committerGitHub <noreply@github.com>2022-05-06 16:08:47 -0400
commita0ecb8675d1c45f083a70a6b3faaebd22abe5417 (patch)
tree54774fbdff2fe6f5e0fd39a3b4f1d7c5963ef23b /pkg/specgen/generate
parenta64dd312a293eb782072ffff976a1de644a00d04 (diff)
parented8c1dfb4c62b05a944c811d49cd56d21c1c1ede (diff)
downloadpodman-a0ecb8675d1c45f083a70a6b3faaebd22abe5417.tar.gz
podman-a0ecb8675d1c45f083a70a6b3faaebd22abe5417.tar.bz2
podman-a0ecb8675d1c45f083a70a6b3faaebd22abe5417.zip
Merge pull request #14136 from Luap99/config-networks
libpod: add c.ConfigWithNetworks()
Diffstat (limited to 'pkg/specgen/generate')
-rw-r--r--pkg/specgen/generate/container.go6
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