Docker中国官方镜像加速
–registry-mirror=https://registry.docker-cn.com
网易163镜像加速
–registry-mirror=http://hub-mirror.c.163.com(亲测好用!)
中科大镜像加速
–registry-mirror=https://docker.mirrors.ustc.edu.cn
配置国内镜像
vi /usr/lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
BindsTo=containerd.service
After=network-online.target firewalld.service containerd.service
Wants=network-online.target
Requires=docker.socket
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
--registry-mirror=https://registry.docker-cn.com #####添加这行
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always
# Note that StartLimit* options were moved from "Service" to "Unit" in systemd 229.
保存后重启
systemctl daemon-reload