绑定已安装卷上的Docker每个容器磁盘配额 [英] Docker Per-Container Disk Quota on Bind Mounted Volumes
问题描述
我正在尝试为客户创建一个简单的托管平台.我正在nginx-proxy后面的VPS上通过docker部署所有应用程序.对于wordpress应用程序,我希望能够限制磁盘空间,以便我的客户端不会使用过多的内存并影响其他应用程序.我将所有卷绑定到一个目录,以便可以使用cron轻松备份.
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.
我已将文件系统更改为overlay2并在centos 7上运行.
I've change the file system to overlay2 and am on centos 7.
[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
当我使用--storage-opt size = 10G运行wordpress容器时,出现以下错误:
When I run a wordpress container with the --storage-opt size=10G I get the following error:
docker: Error response from daemon: --storage-opt is supported only for overlay over xfs with 'pquota' mount option.
这是我正在使用的绑定安装的示例:
This is an example of the bind mount I am using:
-v/DOCKER_VOLUMES/wordpress/appname/www/html:/var/www/html
如何解决此问题?您能否提供完整的说明列表以启用它?