Confirm default cgroup usage

Details

The –cgroup-parent option allows you to set the default cgroup parent to use for all the containers. If there is no specific use case, this setting should be left at its default.

Rationale:

System administrators typically define cgroups under which containers are supposed to run. Even if cgroups are not explicitly defined by the system administrators, containers run under docker cgroup by default.

It is possible to attach to a different cgroup other than that is the default. This usage should be monitored and confirmed. By attaching to a different cgroup than the one that is a default, it is possible to share resources unevenly and thus might starve the host for resources.

Solution

The default setting is good enough and can be left as-is. If you want to specifically set a non-default cgroup, pass –cgroup-parent parameter to the docker daemon when starting it.

For Example,

dockerd –cgroup-parent=/foobar

Impact:

None.

Default Value:

By default, docker daemon uses /docker for fs cgroup driver and system.slice for systemd cgroup driver.

Supportive Information

The following resource is also helpful.

This security hardening control applies to the following category of controls within NIST 800-53: System and Communications Protection.This control applies to the following type of system Unix.

References

Source

Updated on July 16, 2022
Was this article helpful?

Related Articles