Docker – In Docker 17, how is disk space allocated for containers

docker

There are various internet resources that suggest that, by default, docker containers are limited to 10g. However, those explanations go along with an indication that docker system info will show the limit. I've got docker version 17.05.0-ce, and docker system info shows no such limit, which suggests to me that the situation has changed. I've got a build that failed with 'out of space' on file system operations in the container. So, where is the space that I'm out of, and how do I allocate more of it? docker info shows aufs, so is the disk space sitting on the /var file system?

Best Answer

The "base size" limit you see defaulting to 10G is related to the devicemapper storage driver. It doesn't apply to aufs, overlay, overlay2, or other storage drivers. The devicemapper storage driver is commonly used on Red Hat installs.

With aufs, disk is used under /var/lib/docker, you can check for free space there with df -h /var/lib/docker. If you mounted a volume into your container, that disk will be where ever your volume is mounted from. The named volumes default to /var/lib/docker, but other volumes, particularly host volumes, will be located in the directory you specify.

For more details, see:

Selecting a storage driver

Use the device mapper storage driver

Use the aufs storage driver