Docker 換國內源
先創建daemon.json文件,系統默認是沒有這個文件。
sudo vim /etc/docker/daemon.json
復制代碼
編輯daemon.json,填入以下內容。
{
"registry-mirrors": [ "https://kfwkfulq.mirror.aliyuncs.com", "https://2lqq34jg.mirror.aliyuncs.com", "https://pee6w651.mirror.aliyuncs.com", "https://registry.docker-cn.com", "http://hub-mirror.c.163.com" ], "dns": ["8.8.8.8","8.8.4.4"] } 復制代碼
最后重啟docker
service docker restart
復制代碼
作者:愛蘿莉愛掘金
鏈接:https://juejin.cn/post/6844904152007442446
來源:掘金
著作權歸作者所有。商業轉載請聯系作者獲得授權,非商業轉載請注明出處。