Interview Prep/Docker/Resource Limits, Health & Reliability

How do you limit disk usage of a container's writable layer?

AdvancedProductionResource Limits, Health & Reliability
Answer

--storage-opt size=10G works only with overlay2 on XFS mounted with pquota, or with certain drivers (devicemapper, zfs). Otherwise use tmpfs with size=, volumes on quota-enabled filesystems, and alert on docker system df -v / docker ps -s. Kubernetes uses ephemeral-storage limits enforced by the kubelet.

All Docker questions Roadmap: Docker & containers

More on Resource Limits, Health & Reliability