The Docker instance should not use devicemapper as its storage driver

docker

Classification:

compliance

Framework:

cis-docker

Control:

2.7

Description

Docker should use a storage driver other than devicemapper.

Rationale

The devicemapper driver is deprecated, Docker 25 removed it, and its loop-lvm mode suits only testing.

Audit

Show the storage driver of the daemon:

docker info --format 'Storage Driver: {{ .Driver }}'

Datadog passes the rule when the storage driver is other than devicemapper and fails it otherwise.

Remediation

Choose a supported storage driver, such as overlay2 or the containerd snapshotter, with storage-driver in daemon.json or --storage-driver. Changing the driver hides the images and containers of the old one.

Impact

Containers and images of the old driver need to be recreated.

Default value

Docker picks a supported driver, overlayfs with the containerd image store of Docker 29.

References

  1. https://docs.docker.com/engine/storage/drivers/select-storage-driver/