From f813881b81ca669119bd7ac0c313c4f3198228c2 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 5 Nov 2018 22:48:29 +0100 Subject: rootless: mount /sys/fs/cgroup/systemd from the host systemd requires /sys/fs/cgroup/systemd to be writeable. Signed-off-by: Giuseppe Scrivano --- libpod/container_internal_linux.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libpod') diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index dc829ca55..d89eefd3b 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -376,6 +376,14 @@ func (c *Container) setupSystemd(mounts []spec.Mount, g generate.Generator) erro Options: []string{"bind", "private"}, } g.AddMount(systemdMnt) + } else { + systemdMnt := spec.Mount{ + Destination: "/sys/fs/cgroup/systemd", + Type: "bind", + Source: "/sys/fs/cgroup/systemd", + Options: []string{"bind", "nodev", "noexec", "nosuid"}, + } + g.AddMount(systemdMnt) } return nil -- cgit v1.2.3-54-g00ecf