diff options
Diffstat (limited to 'cmd/podman/build.go')
-rw-r--r-- | cmd/podman/build.go | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/cmd/podman/build.go b/cmd/podman/build.go index 5ee35dea0..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), @@ -308,16 +312,6 @@ func buildCmd(c *cliconfig.BuildValues) error { return runtime.Build(getContext(), c, options, dockerfiles) } -// Tail returns a string slice after the first element unless there are -// not enough elements, then it returns an empty slice. This is to replace -// the urfavecli Tail method for args -func Tail(a []string) []string { - if len(a) >= 2 { - return a[1:] - } - return []string{} -} - // useLayers returns false if BUILDAH_LAYERS is set to "0" or "false" // otherwise it returns true func useLayers() string { |