The base device size should not be changed until needed

docker

Classification:

compliance

Framework:

cis-docker

Control:

2.12

Description

The devicemapper base device size should keep its default until a workload needs more.

Rationale

The base device size caps the root filesystem of every container on devicemapper. A larger size lets each container fill more of the host disk.

Audit

Look for dm.basesize among the storage options:

ps -o args= -C dockerd
grep 'dm.basesize' /etc/docker/daemon.json

Datadog reads --storage-opt on the dockerd command line or, if it isn’t set there, storage-opts in daemon.json. It passes the rule when no storage option sets dm.basesize and fails it when one does.

Remediation

Remove dm.basesize from the storage options. Then restart the daemon with systemctl restart docker.

Impact

None.

Default value

The base device size is 10 GB.

References

  1. https://docs.docker.com/reference/cli/dockerd/#storage-driver-options