summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-12-02 08:28:30 -0500
committerMatthew Heon <mheon@redhat.com>2020-12-07 14:51:30 -0500
commit0bbb997838c4828b63c7f45003866fff1fe517e7 (patch)
tree619213f929355d87c3611f19e9809398f45a02fb /pkg/specgen/generate
parente168608460f203e5a3b9298cc1bc6824f5eb78ab (diff)
downloadpodman-0bbb997838c4828b63c7f45003866fff1fe517e7.tar.gz
podman-0bbb997838c4828b63c7f45003866fff1fe517e7.tar.bz2
podman-0bbb997838c4828b63c7f45003866fff1fe517e7.zip
Support --network=default as if it was private
Docker defines an option of "default" which means to use the default network. We should support this with the same code path as --network="". This is important for compatibility with the Docker API. Fixes: https://github.com/containers/podman/issues/8544 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/specgen/generate')
-rw-r--r--pkg/specgen/generate/namespaces.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/specgen/generate/namespaces.go b/pkg/specgen/generate/namespaces.go
index ddc73ca61..036c7b7a1 100644
--- a/pkg/specgen/generate/namespaces.go
+++ b/pkg/specgen/generate/namespaces.go
@@ -233,6 +233,8 @@ func namespaceOptions(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.
val = fmt.Sprintf("slirp4netns:%s", s.NetNS.Value)
}
toReturn = append(toReturn, libpod.WithNetNS(portMappings, postConfigureNetNS, val, nil))
+ case specgen.Private:
+ fallthrough
case specgen.Bridge:
portMappings, err := createPortMappings(ctx, s, img)
if err != nil {