现象:
ubuntu/centos 配置了国内源,一直不生效。重启也不行。
# 1.停docker systemctl stop docker systemctl stop docker.scoket # 2.检查 systemctl status docker # Active: inactive (dead) since # Main PID: 1233648 (code=exited, status=0/SUCCESS) # 这就说明停了 # 3.确认写入国内源 "registry-mirrors": ["http://hub-mirror.c.163.com/"] # 这个json 里可能有 "bip" : "xxxxx" vi /etc/docker/daemon.json # 4.编辑docker service, 可以把原来的内容备份 vi /lib/systemd/system/docker.service # 把 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock # 改成 ExecStart=/usr/bin/dockerd # 5.重启 systemctl daemon-reload systemctl start docker
# 6.确认
docker info
标签:ExecStart,containerd,生效,systemctl,mirror,docker From: https://www.cnblogs.com/fadedlemon/p/17263459.html