aboutsummaryrefslogtreecommitdiff
path: root/libpod/container_internal_linux.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-11-05 22:48:29 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2018-11-07 16:10:34 +0100
commitf813881b81ca669119bd7ac0c313c4f3198228c2 (patch)
tree1f17d9cbdfd98152ff6fd72db95c943f6f0d42cd /libpod/container_internal_linux.go
parent11c5b0237b799ad61b53d67817af673a3d286f25 (diff)
downloadpodman-f813881b81ca669119bd7ac0c313c4f3198228c2.tar.gz
podman-f813881b81ca669119bd7ac0c313c4f3198228c2.tar.bz2
podman-f813881b81ca669119bd7ac0c313c4f3198228c2.zip
rootless: mount /sys/fs/cgroup/systemd from the host
systemd requires /sys/fs/cgroup/systemd to be writeable. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r--libpod/container_internal_linux.go8
1 files changed, 8 insertions, 0 deletions
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