通过代理ssh错误使用Docker

当我在Linux机器上使用docker(Ubuntu 14.04)时,有几个问题。 在我的networking上有一个不允许ssh的代理。 所以我configuration了我的机器通过netcat-openbsd通过http使用ssh。

我在我的机器上configuration了我的主机gitlab,如下所示:

Host gitlab User name.lastname Hostname my_gitlab.com IdentityFile ~/.ssh/my_ssh_key ProxyCommand /bin/nc -X connect -x proxy.example.net:80 %h %p IdentitiesOnly yes 

当我试图从我的机器上获得回购,它完美的作品。 所以我configuration了我的docker与相同的configuration,但我得到这个错误

ssh_exchange_identification:由远程主机closures的连接

我尝试在/ etc / default / docker中configurationhttp_proxy https_proxy,但没有任何更改。

而当我使用Mac OS时,我的泊坞窗完美地使用相同的configuration。

有人知道发生了什么?