Docker: When trying to run docker run hello-world getting – Forbidden

dockerfirewallwindows 7

This is windows 7 machine, Installed docker using docker toolbox version 1.8.2

I am behind corporate firewall.

Initially I was not able to even start the machine so I added two new environment variables: http_proxy, https_proxy and I was able to bring up the default machine

Now when I run, I get:

XXXXXX@CCCCCCC MINGW64 ~  
$ docker run hello-world
An error occurred trying to connect: Post https://192.168.99.100:2376/v1.20/containers/create: Forbidden

Please help.

ps: The other issues on stackoverflow are related to MAC and hence not applicable to me, so admins please don't waste my time in closing this item unnecessarily.

Best Answer

From the looks of it, the docker command-line tool is trying to use your proxy server to connect to the Docker daemon running inside your VM.

Since your host and your Docker VM are running in the same network, you probably won't need the proxy server for talking to the Docker daemon. Try setting the no_proxy environment variable in order to instruct the Docker client to not use the proxy server for that particular address:

export no_proxy=$(docker-machine ip <insert-vm-name-here>)