aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman/libpodruntime
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-07-19 14:24:22 -0400
committerMatthew Heon <matthew.heon@gmail.com>2018-07-24 16:12:31 -0400
commit3ae0c80806b68f712756fd660d06449e71eb41b7 (patch)
treeba16d83caaecc79748cd9c594c71070991ad3b09 /cmd/podman/libpodruntime
parent8f91678a499d29cb5221153e223f5e896cb1b5b1 (diff)
downloadpodman-3ae0c80806b68f712756fd660d06449e71eb41b7.tar.gz
podman-3ae0c80806b68f712756fd660d06449e71eb41b7.tar.bz2
podman-3ae0c80806b68f712756fd660d06449e71eb41b7.zip
Add --namespace flag to Podman
Allows joining libpod to a specific namespace when running a Podman command. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'cmd/podman/libpodruntime')
-rw-r--r--cmd/podman/libpodruntime/runtime.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/libpodruntime/runtime.go b/cmd/podman/libpodruntime/runtime.go
index 3216d288b..9d1347cc5 100644
--- a/cmd/podman/libpodruntime/runtime.go
+++ b/cmd/podman/libpodruntime/runtime.go
@@ -88,6 +88,10 @@ func GetRuntimeWithStorageOpts(c *cli.Context, storageOpts *storage.StoreOptions
// TODO CLI flags for image config?
// TODO CLI flag for signature policy?
+ if c.GlobalIsSet("namespace") {
+ options = append(options, libpod.WithNamespace(c.GlobalString("namespace")))
+ }
+
if c.GlobalIsSet("runtime") {
options = append(options, libpod.WithOCIRuntime(c.GlobalString("runtime")))
}