title: Docker Per-Container Disk Quota on Bind Mounted Volumes
body: <p>I am trying to create a simple hosting platform for my clients. I am deploying all of my apps via docker on a VPS behind nginx-proxy. For wordpress applications I want to be able to limit disk-space so that my clients do not use too much and affect other applications. I bind mount all volumes to a single directory so that I can back-up easily with cron.</p>
  
  <p>I've change the file system to overlay2 and am on centos 7.</p>
  
  <pre><code>[root@my-ip ~]# docker info
  
  Server:
    Containers: 12
    Running: 12
    Paused: 0
    Stopped: 0
   Images: 11
   Server Version: 19.03.1
   Storage Driver: overlay2
    Backing Filesystem: xfs
    Supports d_type: true
    Native Overlay Diff: true
  </code></pre>
  
  <p>When I run a wordpress container with the --storage-opt size=10G I get the following error:</p>
  
  <pre><code>docker: Error response from daemon: --storage-opt is supported only for overlay over xfs with 'pquota' mount option.
  </code></pre>
  
  <p>This is an example of the bind mount I am using:</p>
  
  <p><code>-v /DOCKER_VOLUMES/wordpress/appname/www/html:/var/www/html</code></p>
  
  <p><strong>How do I fix this? Can you please provide a full list of instructions to enable it?</strong></p>