Containers should use the cgroup configured in Docker

docker

Classification:

compliance

Framework:

cis-docker

Control:

5.25

このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください。

Description

Containers should run in the cgroup that Docker gives them.

Rationale

Docker places every container in a cgroup of its own, where the resource limits of the container apply. A container under another parent cgroup takes the permissions and resources of that parent, which can exceed those of the parent that Docker sets.

Audit

Inspect the containers:

docker ps --quiet --all | xargs docker inspect --format '{{ .Name }}: CgroupParent={{ .HostConfig.CgroupParent }}'

Datadog passes the rule when a container’s cgroup parent is empty and fails it otherwise.

Remediation

Run the container without --cgroup-parent, unless a parent cgroup is set on purpose and reviewed.

Impact

None.

Default value

Containers run under the default parent cgroup.

References

  1. https://docs.docker.com/engine/containers/run/#specify-custom-cgroups