docker通过代理pull


配置tinyproxy用于http代理服务器
docker run -d --name tinyproxy --restart always -p 8888:8888 stilleshan/tinyproxy

使用实例
curl -x https://IP:8888 cip.cc

Dockerd 代理
Create a systemd drop-in directory for the docker service:

sudo mkdir -p /etc/systemd/system/docker.service.d
Create a file named /etc/systemd/system/docker.service.d/http-proxy.conf that adds the HTTP_PROXY environment variable:

[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80"
If you are behind an HTTPS proxy server, set the HTTPS_PROXY environment variable:

[Service]
Environment="HTTPS_PROXY=https://proxy.example.com:443"
Multiple environment variables can be set; to set both a non-HTTPS and a HTTPs proxy;

[Service]
Environment="HTTP_PROXY=http://proxy.example.com:80"
Environment="HTTPS_PROXY=https://proxy.example.com:443"

官方文档:
https://docs.docker.com/config/daemon/systemd/#http-proxy

声明:PJin|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - docker通过代理pull


Able to work under high pressure and time limitation.