Docker Community Forums

Share and learn in the Docker community.

Increase container volume(disk) size


Can someone please let me know how to increase the volume(disk) size of container ?.

Once I deployed the container, I just look at the disk space allocated to docker. Just 10GB has allocated to this. Is there any option to set the disk size to 100GB? . I have 1TB Hard disk size

[root@fa10q3907qab ~]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 9.8G 878M 8.4G 10% /


Please someone help me on this. Still I’m wondering to get my problem resolved completely

Read and the more recent

With Centos 7 I did the following to increase the default size of the containers

Modify the docker config in /etc/sysconfig/docker-storage to add the line:
DOCKER_STORAGE_OPTIONS= - -storage-opt dm.basesize=20G
service docker stop
service docker start
docker load < [each_save_in_backup.tar]
docker run -i -t [imagename] /bin/bash

In the bash prompt of the docker container “df -k” should show 20GB / file system size now.

With respect to resizing existing containers, I am not able to get the resize2fs command to succeed.

Can anyone shed additional light on this?

I have installed docker on Linux machine. Then i pulled an image of Red Hat Linux 7. I tried the above approach but was unable to increase the size. Does anyone have any idea regarding this?

I am wondering if you could give me some pointerss on a docker issue that I am facing. I am trying to increase the default fs size for containers created on OEL 7.1/docker 1.6.1 combination. I have tried setting

DOCKER_STORAGE_OPTIONS= --storage-opt dm.basesize=20G

in /etc/sysconfig/docker-storage

and also followed the instructions on the below link for reseting the sparse file size

but even after the above, my ‘docker info’ is showing 'Data Space Total: 107.4 GB’ and new container’s default size is 10G. Any pointers?.

–storage-driver=devicemapper --storage-opt dm.basesize=20G

No such file. No such file.

I am using docker 17.05.0-c ubuntu 16.04
/etc/sysconfig/docker-storage this file does now exist

Does anyone know how to resize the docker volume?

Just create it. i did it, restarted docker and worked