Add --with-ns flag to ctr run/create

Adds a useful flag to `ctr` to enable joining any existing Linux
namespaces for any namespace types (network, pid, ipc, etc.) using the
existing With helper in the oci package.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
Phil Estes
2018-02-16 13:45:25 -05:00
parent aa82d17d1d
commit e4e53bf486
2 changed files with 36 additions and 0 deletions

View File

@@ -65,6 +65,10 @@ var ContainerFlags = []cli.Flag{
Name: "tty,t",
Usage: "allocate a TTY for the container",
},
cli.StringSliceFlag{
Name: "with-ns",
Usage: "specify existing Linux namespaces to join at container runtime (format '<nstype>:<path>')",
},
}
func loadSpec(path string, s *specs.Spec) error {