- 參考文章:
基本信息(OS)
ubuntu 18.04
關(guān)鍵步驟
- 配置docker的registry-mirror
sed -i "s|ExecStart=/usr/bin/dockerd|ExecStart=/usr/bin/dockerd --registry-mirror=https://registry.docker-cn.com/|g" /lib/systemd/system/docker.service
systemctl daemon-reload
systemctl restart docker
#或者可以使用騰訊云地址:https:mirror.ccs.tencentyun.com
- 驗(yàn)證
docker info
確認(rèn)Registry Mirrors的地址已經(jīng)修改成功:
- ERROR: 使用docker pull busybox語句截驮,執(zhí)行中報(bào)錯(cuò):HTTP 408
Using default tag: latest
Error response from daemon: error parsing HTTP 408 response body: invalid character '<' looking for beginning of value: "<html><body><h1>408 Request Time-out</h1>\nYour browser didn't send a complete request in time.\n</body></html>\n\n"
此時(shí)需要修改當(dāng)前網(wǎng)卡的MTU為900
#臨時(shí)修改:
ifconfig eth0 mtu 900
#永久修改(嘗試設(shè)置艳悔,但是失敗了...):
#vi /etc/network/interfaces
#【在最后增加內(nèi)容: mtu 900 】...
【然后重啟網(wǎng)卡】
/etc/init.d/networking restart