必要条件

磁盘须是XFS格式

安装docker(Debian)

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

查看环境是否满足

docker info
......
Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
......

开启quota支持

vi /etc/default/grub
# 修改为
GRUB_CMDLINE_LINUX="rootflags=uquota,pquota"
# 更新设置
#ubuntu/debian下:
update-grub
# centos下:
grub2-mkconfig

开启目录配额

systemctl stop docker
vi /etc/docker/daemon.json
# 修改为
{
    "storage-driver": "overlay2",
    "storage-opts": [
      "overlay2.size=50G",
      "overlay2.override_kernel_check=true"
    ]
}
systemctl start docker

如果报错reboot重启即可

相关:文件配额

vi /etc/default/grub
# 修改为
GRUB_CMDLINE_LINUX="rootflags=prjquota"


- 美国低价服务器,G口带宽,稳定不丢包 -

Last modification:May 17, 2022
If you think my article is useful to you, please feel free to appreciate