diff options
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index 30dbf52e6..bd0074e56 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -1296,7 +1296,9 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) { g.AddProcessEnv("container", "libpod") } - if c.runtime.config.CgroupManager == SystemdCgroupsManager { + if os.Getuid() != 0 { + g.SetLinuxCgroupsPath("") + } else if c.runtime.config.CgroupManager == SystemdCgroupsManager { // When runc is set to use Systemd as a cgroup manager, it // expects cgroups to be passed as follows: // slice:prefix:name |