2017-11-07 12 views
1

Docker Toolbox for Windows 10を会社のプロキシの背後で動作させるのに問題があります。boot2docker:ホストへのルートがありません

ドッカーログインまたはドッカーが動作するようにすることができないため、ここでデバッグを行っています。

仮想マシン内にプレーンなubuntuマシンを作成しました。

$ curl 10.0.2.2:8000 
$ [it retrieves the html being served] 

$ curl www.google.com 
$ curl (7) Failed to connect to www.google.com port 80: Connection refused 
$ export http_proxy=http://my-proxy:3128 
$ curl www.google.com 
$ curl: (7) Failed to connect to my-proxy:3128: No route to host 

はここで何が起こっている:boot2dockerオン

$ curl 10.0.2.2:8000 
$ [it retrieves the html being served] 

$ curl www.google.com 
$ curl (7) Failed to connect to www.google.com port 80: Connection refused 
$ export http_proxy=http://my-proxy:3128 
$ curl www.google.com 
$ [302 HTTP response from google] 

:私のホストマシン上で

は、私はポートのubuntuで8000

上で実行されている単純なサーバーを起動しますか?

+0

@Matt - nope - 'no route to host' – dwjohnston

+0

' $(boot2docker shellinit) 'を実行しましたか? (https://github.com/boot2docker/boot2docker/issues/672#issuecomment-77166520以下) – VonC

+0

@VonC - 私はコマンドラインの引数としてboot2dockerを持っていません。 – dwjohnston

答えて

0

私はついにこれを解決しました。

問題は、会社のプロキシがデフォルトのドッカーVMブリッジと同じサブネットに存在することでした。 (すなわち、172.17.x.x)。

簡単な回避策 - これは、ドッカーVM内で変更することで解決できます。

$ docker-machine ssh mydockervm 

$ ifconfig docker0 172.18.0.1 netmask 255.255.0.0 
関連する問題