summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2019-07-23 13:13:57 -0400
committerQi Wang <qiwan@redhat.com>2019-07-23 15:11:42 -0400
commit8c9b78e8bcb200220f2871c4c9b43d69f6939a38 (patch)
tree2f0c0bfc26b573f3216c2c4e0292f25d5dd9768b /cmd
parent7dbc6d8f36f3b85275bed998b5e34f7d5870659e (diff)
downloadpodman-8c9b78e8bcb200220f2871c4c9b43d69f6939a38.tar.gz
podman-8c9b78e8bcb200220f2871c4c9b43d69f6939a38.tar.bz2
podman-8c9b78e8bcb200220f2871c4c9b43d69f6939a38.zip
fix build --network=container
Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/build.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/build.go b/cmd/podman/build.go
index 19337985d..14ac51889 100644
--- a/cmd/podman/build.go
+++ b/cmd/podman/build.go
@@ -101,6 +101,10 @@ func getNsValues(c *cliconfig.BuildValues) ([]buildah.NamespaceOption, error) {
Name: string(specs.NetworkNamespace),
Host: true,
})
+ } else if c.Network == "container" {
+ ret = append(ret, buildah.NamespaceOption{
+ Name: string(specs.NetworkNamespace),
+ })
} else if c.Network[0] == '/' {
ret = append(ret, buildah.NamespaceOption{
Name: string(specs.NetworkNamespace),