How to increase the size limit of a docker container?

Refresh

6 days ago

Views

15 time

2

Context: I'm under Archlinux, and wanted to create a dockerfile as a reference for users of my program under Ubuntu 16.04 (xenial). It only has an old OpenCV version (2.4) on apt, so I need to compile OpenCV from sources.

Problem: OpenCV compilation creates more than 10G of data, which is the container size limit (visible with df -h), and thus crashes before finishing compilation.

Last failed attempt: I saw that there is a daemon option --storage-opt dm.basesize=20G. So I changed the docker.service line:

After restarting the daemon service, and pruning all my images and containers, the command docker info now shows "Base Device Size: 21.47GB" instead of some 10GB previously. However, every new container still have a size limit of 10G. The command df -h shows: