ubuntu下docker 代理配置问题
这个代理真是一波三折啊。
因为国内的奇葩环境问题,docker被强了。直接连接docker hub会timeout。so。我们设置一个代理。
mkdir -p /etc/systemd/system/docker.service.d/
touch /etc/systemd/system/docker.service.d/http-proxy.conf
gedit /etc/systemd/system/docker.service.d/http-proxy.conf
此时,在弹出的文本编辑器内输入:
[Service]
Environment="https_proxy=http://127.0.0.1:12639"
注意,一定要设置为https_proxy而不是HTTPS_PROXY或者http_proxy,否则会报:
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp: tls: oversized record received with length 20527
来自 大脸猪 写于 2019-11-22 11:28 -- 更新于2020-10-19 13:06 -- 0 条评论