I want to increase the disk space of a Docker container. Here is the output from docker info.
Containers: 3
Running: 3
Paused: 0
Stopped: 0
Images: 4
Server Version: 19.03.5
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
I have read that the disk space is 10GB by default, supposedly this limit is dropped with overlay2. This does not seem to be the case for me.
docker run -d --name jd2 --restart always -v $HOME/docker/volumes/jd2:/opt/JDownloader/cfg -v $HOME/downloads:/opt/JDownloader/Downloads plusminus/jdownloader2-headless
2
Answers
Please follow the steps below to increase the default size of a docker container –
Let me know if this doesnt help .
That is not accurate.
Earlier releases of Docker used the
devicemapper
storage driver on CentOS, which creates a new virtual block device for each container. In this case, the default per-container size was 10GB, and could be controlled by thedm.basesize
storage option.Thanks to kernel updates and additional development work, the default storage driver on CentOS and most other distributions is the
overlay2
storage driver. This no longer relies on a per-container block device, and instead makes use of overlayfs. One of the practical impacts of this is that there is no longer a per-container storage limit: all containers have access to all the space under/var/lib/docker
. There is no longer any sort of per-container 10GB limit.See the documentation for more information about the overlay2 storage driver.
If you are running out of space in
/var/lib/docker
, you can add space as you would for any other filesystem.