gpt4 book ai didi

docker - docker,-storage-opts和aufs storage-driver

转载 作者:行者123 更新时间:2023-12-02 18:16:23 26 4
gpt4 key购买 nike

我希望能够限制容器的大小,但是使用默认的存储驱动程序aufs(对于Ubuntu 14.04),当我尝试使用--storage-opt参数时出现错误

$ 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以外的其他选项?

最佳答案

在Docker 1.12中的devicemapperzfsbtrfs以及Windows上运行时,--storage-opt size=X可用。

该选项当前不适用于aufs或overlay / 2存储驱动程序。

看来overlay2 on XFS将在Docker 1.13-1.14中获得支持。 Ext4支持将在一段时间后发布,因为它依赖于比大多数当前发行版(4.5+)更高的内核更新。

aufs可能无法获得该功能,因为Docker似乎正在努力将overlay2设置为默认值,因为4+内核已内置了对overlay的支持。

关于docker - docker,-storage-opts和aufs storage-driver,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39890463/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com