adeiji
adeiji

Reputation: 570

Docker Increase default storage space of container with storage driver overlay2

I've been looking all over the web and I can't seem to find a solution to this problem. The storage driver for my docker instance is overlay2 and I need to increase the default storage space for a new container.

The only thing I've been able to find is to use the --storage-opt flag, but per their documentation...

For the overlay2 storage driver, the size option is only available if the backing fs is xfs and mounted with the pquota mount option

My current backing filesystem is extfs, so this option does not work. Anyone know how I would go about doing this on my Mac?

Upvotes: 1

Views: 2700

Answers (1)

larsks
larsks

Reputation: 311606

The overlay2 driver does not generally apply any space limitations to new containers. A container may use as much storage as it requires up to the limits of the underlying filesystem (typically, /var/lib/docker).

As you note in the documentation, the only mechanism by which the overlay2 driver can enforce container storage limits is if you are (a) using XFS and (b) have enabled pquota (project quota) support.

If you're on a Mac, your container storage is limited by the size of the virtual disk attached to the Linux VM on which Docker is actually running. If you're running out of space, you can probably resize the disk to provide additional container storage space.

Upvotes: 5

Related Questions