/etc/docker/daemon.json
{
"graph": "/data/docker",
"storage-driver": "overlay2",
"insecure-registries": ["registry.access.redhat.com","quay.io","harbor.od.com"],
"registry-mirrors": ["https://q2gr04ke.mirror.aliyuncs.com"],
"bip": "172.7.22.1/24",
"exec-opts": ["native.cgroupdriver=systemd"],
"live-restore": true
}
上文解释
{
"graph": "/data/docker", //docker的工作目录。会自动生成一些文件夹
"storage-driver": "overlay2", //存储驱动。使用overlay2
"insecure-registries": ["registry.access.r示例edhat.com","quay示例.io"], //不安全的registries。自己的私有仓库也填在里边
"registry-mirrors": ["https://q2gr04ke.mirror.aliyuncs.com"], //镜像加速源。这里是阿里的
"bip": "172.7.22.1/24", //docker的网络地址
"exec-opts": ["native.cgroupdriver=systemd"],
"live-restore": true
}