Docker commands from windows with proxy

Instead of trying to solve small problems on my own, I asking for the big picture here. I’m at a company which uses a proxy. I installed Docker Toolbox 1.8.2c. I recently found out that I can execute docker commands in git bash in windows - nice.

Unfortunately I can’t pull images per default, because of the proxy I guess. “Network timed out while trying to connect to [https://]index.docker.io/v1/repositories/library/java/images. You may want to check your internet connection or if you are behind a proxy.”

Alright, so I set a proxy in /var/lib/boot2docker/profile, as mentioned in this thread DNS Problem, probably related to proxy? Now I can pull images, but only if I execute docker commands from within the vm. Which means that I no longer can call docker build … on windows, I have to “docker-machine ssh default” and then execute docker build. If I call docker ps in windows, I get “An error occurred trying to connect: Get https://192.168.99.100:2376/v1.20/images/json: dial tcp 192.168.99.100:2376: ConnectEx tcp: No connection could be made because the target machine actively refused it.”.

Building images from within the vm is also not ok, because I haven’t figured out a way to access started containers from windows.

It feel utterly cluttered, and I don’t think it’s supposed to be this confusing. What steps should I take towards an easy setup?


I built a new vm with the env options and set the proxy there. Now I can call docker commands from windows and pull images. I don’t know yet if I get a network error for apt-get update.

I recall trying this before, I don’t know why it didn’t work back then. I guess it failed because I was executing docker commands from within the vm. I’m leaving this here for documentation purposes.