运维系列:Could not fetch/save url https://download.docker.com/linux/centos/docker-ce.repo to file /etc/y

坦笑&&life 2024-08-12 09:07:05 阅读 67

Could not fetch/save url https://download.docker.com/linux/centos/docker-ce.repo to file /etc/y

Could not fetch/save url https://download.docker.com/linux/centos/docker-ce.repo to file /etc/yum.re

解决docker在代理下不能拉取镜像


Could not fetch/save url https://download.docker.com/linux/centos/docker-ce.repo to file /etc/yum.re

解决docker在代理下不能拉取镜像

解决方案

如下步骤执行即可,注意proxy的替换

<code>#First, create a systemd drop-in directory for the Docker service:

mkdir /etc/systemd/system/docker.service.d

#Now create a file called /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable:

# 换成自己的代理ip



声明

本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。