Creating a Separate Partition for Docker
After Docker is installed, the default directory /var/lib/docker stores Docker files, including images and containers. When the storage space of the directory is full, Docker and the host may be unavailable. For this reason, a partition (logical volume) needs to be created to save the Docker files.
- Create a separate partition on the newly installed device to mount the /var/lib/docker directory. For details, see Table 1.
- For an installed system, use the Logical Volume Manager (LVM) to create a partition.
Parent topic: Hardening Container Security