原文:
国内屏蔽了Docker Hub的访问,并且禁止了国内的Docker Hub镜像站,目前的办法就是挂代理比较稳定.
1. 找到docker.service的位置
systemctl status docker

红色方框内极为Docker服务文件的位置
2. 编辑docker.services
sudo nano /lib/systemd/system/docker.service

docker.service中添加如下内容
Environment="http(s)_proxy=<代理服务器IP>:<代理端口>"
(图片加了#,是禁用这个功能,取消#即启用了这个功能)
3.重启docker服务
systemctl daemon-reload
systemctl restart docker
文章评论
This website online is really a walk-through for the entire information you wished about this and didn’t know who to ask. Glimpse right here, and you’ll positively uncover it.
You have observed very interesting points! ps nice site. "'We're always lucky,' I said and like a fool I did not knock on wood." by Ernest Hemingway.
Thank you for sharing excellent informations. Your web-site is so cool. I am impressed by the details that you?¦ve on this website. It reveals how nicely you perceive this subject. Bookmarked this website page, will come back for extra articles. You, my friend, ROCK! I found just the information I already searched everywhere and just could not come across. What an ideal website.