diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 5aa4ee9a9e0a..e1ccfce13e7a 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -364,7 +364,7 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) { if err != nil { return nil, err } - if rootless.IsRootless() && !unified { + if (rootless.IsRootless() && !unified) || c.config.NoCgroups { g.SetLinuxCgroupsPath("") } else if c.runtime.config.CgroupManager == SystemdCgroupsManager { // When runc is set to use Systemd as a cgroup manager, it