1. Home
  2. Security Hardening
  3. CIS Docker 1.13.0 V1.0.0 L1.Linux
  4. Create a separate partition for containers

Create a separate partition for containers

Details

All Docker containers and their data and metadata is stored under /var/lib/docker directory. By default, /var/lib/docker would be mounted under / or /var partitions based on availability.

Rationale:

Docker depends on /var/lib/docker as the default directory where all Docker related files, including the images, are stored. This directory might fill up fast and soon Docker and the host could become unusable. So, it is advisable to create a separate partition (logical volume) for storing Docker files.

Solution

For new installations, create a separate partition for /var/lib/docker mount point.For systems that were previously installed, use the Logical Volume Manager (LVM) to create partitions.

Impact:

None.

Default Value:

By default, /var/lib/docker would be mounted under / or /var partitions based on availability.

Supportive Information

The following resource is also helpful.

This control applies to the following type of system Unix.

Source

Updated on July 16, 2022
Was this article helpful?

Related Articles