Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 758 Bytes

Docker container storage quota.md

File metadata and controls

24 lines (16 loc) · 758 Bytes
created modified
2023-07-30 22:11:02 +0800
2023-07-30 22:14:29 +0800

Docker container storage quota

--storage-opt is supported only for overlay over xfs with 'pquota' mount option.

change data-root to somewhere else in /etc/docker/daemon.json

edit /etc/fstab and add our xfs block on new line (find uuid using blkid)

docker run --storage-opt size=10M --rm -it alpine

when using devmapper make sure size is greater than 10G (default)

docker run --storage-opt size=11G --r'm -it alpine

zfs, vfs (not a unionfs, but for testing) storage drivers also supports disk quota. you may use it by changing data-root to the related storage device.