curl -fsSL get.docker.com -o get-docker.sh
sudo sh get-docker.sh --mirror Aliyun
#启动
docker
Create daemon.json file in /etc/docker:
{
"registry-mirrors": [
"https://hub-mirror.c.163.com",
"https://mirror.baidubce.com"
],
"hosts":["tcp://0.0.0.0:2375","unix:///var/run/docker.sock"]
}
Add /etc/systemd/system/docker.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd
Reload the systemd daemon:
systemctl daemon-reload
Restart docker:
systemctl restart docker.service