我想要限制容器大小的能力,但是使用默认的存储驱动程序aufs (对于Ubuntu14.04)当我尝试使用--存储-选择参数时,我会得到一个错误
$ docker create -it --name="disk_test" --storage-opt size=100G --cpuset-cpus="10,11,12,13,14,15,16,17" -m=16G ubuntu:14.04
Unable to find image 'ubuntu:14.04' locally
14.04: Pulling from library/ubuntu
04c996abc244: Pull complete
d394d3da86fe: Pull complete
bac77aae22d4: Pull complete
b48b86b78e97: Pull complete
09b3dd842bf5: Pull complete
Digest: sha256:bd00486535fd3ab00463b0572d94a62715cb790e482d5419c9179cd22c74520b
Status: Downloaded newer image for ubuntu:14.04
Error response from daemon: --storage-opt is not supported for aufs当我使用devicemanager作为我的存储驱动程序时,它可以工作。如果我想限制我的容器根文件系统大小,我唯一的选择是选择非aufs的东西吗?
发布于 2016-10-06 08:56:12
--storage-opt size=X可以在Docker1.12中的设备映射器、zfs和btrfs上运行,可能也可以在windows上运行。
该选项目前不适用于aufs或storage /2存储驱动程序。
看起来XFS上的overlay2将在Docker1.13-1.14中得到支持。Ext4支持将在一段时间后进行,因为它比大多数发行版(4.5+)更依赖更新的内核。
aufs可能无法获得这个特性,因为Docker似乎正在将overlay2作为默认功能,因为4+内核已经构建了对覆盖的支持。
发布于 2016-10-06 08:48:57
您可以告诉Docker使用DeviceMapper存储后端而不是AuFS。这样,每个容器将在一个块设备上运行。
https://stackoverflow.com/questions/39890463
复制相似问题