mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Add support for launching containers without CGroups
This is mostly used with Systemd, which really wants to manage CGroups itself when managing containers via unit file. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -375,7 +375,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
|
||||
|
Reference in New Issue
Block a user