diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2018-07-23 12:37:29 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-07-24 21:50:49 +0000 |
commit | 41c7e43b4dbba117d41d82cd8d5c0f004daba21e (patch) | |
tree | 15fee619996c847b99e19321485e49308aeec7f6 /pkg/spec/spec.go | |
parent | 6f65490e274e5cde5f5cb616719ea27932a764ee (diff) | |
download | podman-41c7e43b4dbba117d41d82cd8d5c0f004daba21e.tar.gz podman-41c7e43b4dbba117d41d82cd8d5c0f004daba21e.tar.bz2 podman-41c7e43b4dbba117d41d82cd8d5c0f004daba21e.zip |
network: support ns: prefix to join existing namespace
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #1145
Approved by: rhatdan
Diffstat (limited to 'pkg/spec/spec.go')
-rw-r--r-- | pkg/spec/spec.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go index ada84a87c..acc41f7c5 100644 --- a/pkg/spec/spec.go +++ b/pkg/spec/spec.go @@ -346,6 +346,9 @@ func addNetNS(config *CreateConfig, g *generate.Generator) error { } else if netMode.IsContainer() { logrus.Debug("Using container netmode") return nil + } else if IsNS(string(netMode)) { + logrus.Debug("Using ns netmode") + return g.AddOrReplaceLinuxNamespace(spec.NetworkNamespace, NS(string(netMode))) } else if netMode.IsUserDefined() { logrus.Debug("Using user defined netmode") return nil |