Pass HTTP_PROXY when creates Docker VMs

If your docker operations are behind a firewall. You have to setup proxies when you create Docker VMs. The following command will not work,

docker-machine create -d virtualbox myvm1

If you run docker search ubuntu, it will return time-out.

You should pass HTTP_PROXY and related setting with below format:

docker-machine create -d virtualbox –engine-env HTTP_PROXY=http://www-proxy.xxx.com:80 –engine-env HTTPS_PROXY=http://www-proxy.xxx.com:80 –engine-env NO_PROXY=localhost,127.0.0.1,xxx.com myvm1