1、Daemon配置
# vim /etc/docker/daemon.json { "registry-mirrors": [ "https://docker.m.daocloud.io", "https://docker.1panel.live", "https://hub.rat.dev", "https://docker.kubesre.xyz", "https://dockercf.jsdelivr.fyi" ], "insecure-registries": ["127.0.0.1/8", "reg.example.com"], "exec-opts": ["native.cgroupdriver=systemd"], "log-driver": "json-file", "log-level": "warn", "log-opts": { "max-size": "100m", "max-file": "10" }, "storage-driver": "overlay2", "live-restore": true, "default-shm-size": "128M", "max-concurrent-downloads": 10, "max-concurrent-uploads": 10, "debug": false, "data-root": "/var/lib/docker" }
2、使配置生效
systemctl daemon-reload systemctl restart docker
3、查看配置
docker info
4、镜像加速器参考:
https://gist.github.com/y0ngb1n/7e8f16af3242c7815e7ca2f0833d3ea6