donglian6625 2016-06-01 15:53
浏览 626

Docker抱怨ALL_PROXY环境变量带有“代理:未知方案:http”

I'm facing the following issue with my Docker containers: When I try to enter the container using

docker exec -it container-id /bin/bash

Docker (I assume it's Docker) complains with the following message:

proxy: unknown scheme: http

I have traced this back to the following environment variable that's set on my host machine, since I'm using a proxy server to access the web:

ALL_PROXY=http://myproxy:8080

The error message seems to come from the net/proxy.go file, which can be found here - the error message is issued on the last line of the file. Why would http not be a registered URL scheme in the Docker case?

As soon as I unset ALL_PROXY on the host, I can enter the container without any issues.

Environment:

  • Mac OS X v10.11.5
  • Docker v1.11.1
  • Docker-Machine v0.7.0

Any idea how to fix this (other than unsetting the variable each time)?

  • 写回答

1条回答 默认 最新

  • drvxclagw656708070 2016-07-24 21:04
    关注

    I am facing the same issue with docker 1.11.2. I believe the error is coming from method FromURL.

    After checking the relevant commit https://github.com/docker/docker/commit/16effc66c028a7800096ed92174ca4bceba229ad, it turns out from v1.11.0-rc1 up to v1.12.0-rc4 are including this commit.

    So the solution for me is to install a lower version (I used v1.10.3) of docker toolbox, after which "docker run hello-world" works.

    评论

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么