docker

docker拉取镜像访问失败配置代理访问

sudo mkdir -p /etc/systemd/system/docker.service.d sudo touch /etc/systemd/system/docker.service.d/proxy.conf

proxy.conf 添加如下配置(根据实际配置代理ip)

[Service]
Environment="HTTP_PROXY=http://192.168.6.254:10811/"
Environment="HTTPS_PROXY=http://192.168.6.254:10811/"
Environment="NO_PROXY=localhost,127.0.0.1"

重启:

sudo systemctl daemon-reload
sudo systemctl restart docker

关于作者

程序员,软件工程师,java, golang, rust, c, python,vue, Springboot, mybatis, mysql,elasticsearch, docker, maven, gcc, linux, ubuntu, centos, axum,llm, paddlepaddle, onlyoffice,minio,银河麒麟,中科方德,rpm