summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-04-12 12:33:20 +0200
committerGitHub <noreply@github.com>2021-04-12 12:33:20 +0200
commit3b03ff7d1ea65c31ca8c9a28e70f7dd5a43afbf0 (patch)
treeb685921f06c17b17dd1825e3692eb8e741a685d7 /cmd/podman
parent0d9b1b832cc668bf69463e4077a1dc3dc3c1e82e (diff)
parent0a39ad196cf4af601b0ea32b2c0e0490c9079377 (diff)
downloadpodman-3b03ff7d1ea65c31ca8c9a28e70f7dd5a43afbf0.tar.gz
podman-3b03ff7d1ea65c31ca8c9a28e70f7dd5a43afbf0.tar.bz2
podman-3b03ff7d1ea65c31ca8c9a28e70f7dd5a43afbf0.zip
Merge pull request #9950 from Luap99/unshare-rootless-cni
podman unshare: add --rootless-cni to join the ns
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/system/unshare.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/podman/system/unshare.go b/cmd/podman/system/unshare.go
index 5e6ff569b..c07751532 100644
--- a/cmd/podman/system/unshare.go
+++ b/cmd/podman/system/unshare.go
@@ -12,9 +12,10 @@ import (
)
var (
+ unshareOptions = entities.SystemUnshareOptions{}
unshareDescription = "Runs a command in a modified user namespace."
unshareCommand = &cobra.Command{
- Use: "unshare [COMMAND [ARG...]]",
+ Use: "unshare [options] [COMMAND [ARG...]]",
DisableFlagsInUseLine: true,
Short: "Run a command in a modified user namespace",
Long: unshareDescription,
@@ -33,6 +34,7 @@ func init() {
})
flags := unshareCommand.Flags()
flags.SetInterspersed(false)
+ flags.BoolVar(&unshareOptions.RootlessCNI, "rootless-cni", false, "Join the rootless network namespace used for CNI networking")
}
func unshare(cmd *cobra.Command, args []string) error {
@@ -49,5 +51,5 @@ func unshare(cmd *cobra.Command, args []string) error {
args = []string{shell}
}
- return registry.ContainerEngine().Unshare(registry.Context(), args)
+ return registry.ContainerEngine().Unshare(registry.Context(), args, unshareOptions)
}