Docker: when trying to launch docker, run hello-world get - Forbidden

This is a Windows 7 machine installed docker using a docking station version 1.8.2

I am behind the corporate firewall.

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

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: Other problems in stackoverflow are related to the MAC and therefore are not applicable to me, so administrators, please do not waste your time closing this element unnecessarily.

+7
source share
5 answers

In appearance, the docker command-line tool tries to use your proxy server to connect to the Docker daemon running inside your virtual machine.

Since your host and your Docker VM are on the same network, you probably will not need a proxy server to communicate with the Docker daemon. Try setting the no_proxy environment variable to tell the Docker client not to use a proxy server for this particular address:

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

So, you probably have a problem with env variables for your docker-machine It looks like it cannot find the correct certificates under $ {HOME} /. docker

Try setting up your environment:

 eval "$(docker-machine env default) 

If nothing works, remove your default dock

 docker-machine rm default 

and recreated it.

 docker-machine create default 
+2
source

For me, the information below: https://docs.docker.com/docker-for-windows/ solved the problem.

Note. Some users have reported issues with connecting to the Docker Hub on Docker for a stable version of Windows. This would appear in an error when trying to run docker commands that pull images from the Docker Hub that are not yet loaded, for example, the first launch of docker to launch hello-world. If you encounter this, reset the DNS server using a fixed Google DNS address: 8.8.8.8.

+2
source

In my case, I set export http_proxy="......." in my bash_profile. Commenting this seems to solve the problem for Docker.

I tried the @helmbert suggestion, but just export no_proxy... didn't work for me.

Note. I am running Docker Toolbox 1.12.1 on OsX 10.10

+1
source

I use a proxy, and they returned an error when I followed the tutorial on docker https://docs.docker.com/get-started/part4/ by doing the following:

 docker-machine env <VM name> eval $(docker-machine env <VM name>) docker stack deploy -c docker-compose.yml <app name> 

I solved this with:

 docker-machine env --no-proxy <VM name> 

instead:

 docker-machine env <VM name> 
0
source

All Articles