【发布时间】:2017-12-02 12:13:26
【问题描述】:
不幸的是,我不能在代理后面使用我的 docker,我按照谷歌搜索的建议进行操作,这是我在运行 sudo docker run hello-world 时遇到的错误:
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-
1.docker.io/v2/: Proxy Authentication Required.
See 'docker run --help'.
这是我的“/etc/systemd/system/docker.service.d/http-proxy.conf”文件:
[Service]
Environment="HTTP_PROXY=http://user:pass@127.0.0.1:8800/"
Environment="HTTPS_PROXY=https://user:pass@127.0.0.1:8800/"
我的“etc/default/docker”文件:
export http_proxy="http://127.0.0.1:3128/"
export https_proxy="http://127.0.0.1:3128/"
export HTTP_PROXY="http://127.0.0.1:3128/"
export HTTPS_PROXY="http://127.0.0.1:3128/"
有什么问题? 谢谢你:)
【问题讨论】:
-
告诉你的 docker 版本和操作系统?
-
添加代理后你做了
daemon reload和dockerrestart吗? -
@Shettyh 是的,我做到了。
-
@Saran Ubuntu 17.04,Docker 版本 17.09.0-ce,构建 afdb6d4