docker / machine

Machine management for a container-centric world
https://docs.docker.com/machine/
Apache License 2.0
6.63k stars 1.97k forks source link

Proxy configuration for docker daemon tcp protocol #4394

Open ClementB-OBS opened 6 years ago

ClementB-OBS commented 6 years ago

Configuration :

I tried to install and use a docker machine on OpenStack Provider. No problem for machine creation and installation (I have set HTTP_PROXY and HTTPS_PROXY env variables for HTTP request, and configure ssh), but at the end :

Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "84.39.36.195:2376": dial tcp 84.39.36.195:2376: i/o timeout

Same issue here :

$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER        ERRORS
default   *        virtualbox   Running   tcp://192.168.99.100:2376           v18.02.0-ce
testing            openstack    Timeout

I haven't found the proxy configuration for the docker client, only for docker engine.

No problem for ssh :

$ docker-machine ssh testing

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
cloud@testing:~$

Please, it's the last step to success :-)

volkc-basf commented 6 years ago

Hi @ClementB-OBS,

we have a very similar problem with amazonec2 in our corporate network. I'm pretty sure that this is a bug of the dockerclient used by docker-machine. It simply ignores the proxy parameters that are set within the environment.

I've spent some time on writing a fix, samalba/dockerclient#245 should solve the issue.

Best, Chris