Reputation: 113
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.
Upvotes: 9
Views: 6737
Reputation: 11
I use a proxy and I had the error returned when I followed the docker tutorial https://docs.docker.com/get-started/part4/, after executing the following:
docker-machine env <VM name>
eval $(docker-machine env <VM name>)
docker stack deploy -c docker-compose.yml <app name>
I solved it using:
docker-machine env --no-proxy <VM name>
instead of:
docker-machine env <VM name>
Upvotes: 1
Reputation: 2217
In my case, I have set
export http_proxy="......."
in my bash_profile. Comment it out seems to solve the problem for Docker.
I tried @helmbert's suggestion, but simply export no_proxy...
did not work for me.
Note: I'm running Docker Toolbox 1.12.1 on OsX 10.10
Upvotes: 1
Reputation: 21
For me the below info from :https://docs.docker.com/docker-for-windows/ solved the issue.
Note:Some users reported problems connecting to Docker Hub on Docker for Windows stable version. This would manifest as an error when trying to run docker commands that pull images from Docker Hub that are not already downloaded, such as a first time run of docker run hello-world. If you encounter this, reset the DNS server to use the Google DNS fixed address: 8.8.8.8.
Upvotes: 2
Reputation: 38034
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>)
Upvotes: 9
Reputation: 61669
So you probably have an issue with the env variables for your docker-machine
Looks like it can't find the right certs under ${HOME}/.docker
Try setting your environment:
eval "$(docker-machine env default)
If nothing works remove your default docker-machine
docker-machine rm default
and re-created it.
docker-machine create default
Upvotes: 2