From 0b57e77d7c1c54706611c9ca15e352425adb05e5 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 8 Jul 2019 13:11:18 +0200 Subject: libpod: support for cgroup namespace allow a container to run in a new cgroup namespace. When running in a new cgroup namespace, the current cgroup appears to be the root, so that there is no way for the container to access cgroups outside of its own subtree. By default it uses --cgroup=host to keep the previous behavior. To create a new namespace, --cgroup=private must be provided. Signed-off-by: Giuseppe Scrivano --- cmd/podman/common.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/podman/common.go') diff --git a/cmd/podman/common.go b/cmd/podman/common.go index 15f753d55..1e9092bd6 100644 --- a/cmd/podman/common.go +++ b/cmd/podman/common.go @@ -129,6 +129,10 @@ func getCreateFlags(c *cliconfig.PodmanCommand) { "cap-drop", []string{}, "Drop capabilities from the container", ) + createFlags.String( + "cgroupns", "host", + "cgroup namespace to use", + ) createFlags.String( "cgroup-parent", "", "Optional parent cgroup for the container", -- cgit v1.2.3-54-g00ecf