mirror of
https://github.com/containers/podman.git
synced 2025-10-25 18:25:59 +08:00
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>
This commit is contained in:
@ -376,6 +376,14 @@ func (c *Container) setupSystemd(mounts []spec.Mount, g generate.Generator) erro
|
|||||||
Options: []string{"bind", "private"},
|
Options: []string{"bind", "private"},
|
||||||
}
|
}
|
||||||
g.AddMount(systemdMnt)
|
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
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user