问题描述
- 使用了镜像加速依然无法拉取部分镜像
解决思路
- 使用代理方式拉取
- 建立代理
- 配置docker代理
- 测试
Demo
# 已有镜像加速查看
# docker info
.....
Registry Mirrors:
http://hub-mirror.c.163.com/
https://dhq94f.mirror.aliyuncs.com/
https://docker.mirrors.ustc.edu.cn/
https://registry.docker-cn.com/
.....
# docker pull calico/cni:v3.17.3
"http: TLS handshake timeout"
# 搭建v2raya
# docker run -d \
--restart=always \
--privileged \
--network=host \
--name v2raya \
-v /etc/v2raya:/etc/v2raya \
mzz2017/v2raya
需要Ghelper的订阅base64解码
-
获取订阅
ghelper.png -
打开订阅
订阅.png -
解码订阅
base64.png -
导入一个地址
导入.png -
设置全局代理
全局代理.png -
链接通道
链接.png - 设置docker代理
# https://docs.docker.com/config/daemon/systemd/#httphttps-proxy
# mkdir -p /etc/systemd/system/docker.service.d
# vi /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://localhost:20171"
Environment="HTTPS_PROXY=http://localhost:20171"
Environment="NO_PROXY=localhost,127.0.0.1"
# systemctl daemon-reload
# systemctl restart docker
# 测试通道
# curl -s -x localhost:20171 http://ip.tool.chinaz.com | grep -C 1 "您的"
<dl class="IpMRig-tit">
<dt>您的IP</dt>
<dd class="fz24">218.255.149.34</dd>
# 测试拉取
# docker pull calico/cni:v3.17.3
v3.17.3: Pulling from calico/cni
f9b053be2b0b: Pull complete
d170aa98f431: Pull complete
63130043cefa: Pull complete
Digest: sha256:ee8094aabb4406299fe7a41c5dec8cada52d49b93bac24d83d0b9c4aeb3c6085
Status: Downloaded newer image for calico/cni:v3.17.3
docker.io/calico/cni:v3.17.3
网友评论