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.
When we launch our Docker container, we can pass environment variables as key-value pairs directly into the command line using the parameter –env (or its short form -e). As can be seen, the Docker container correctly interprets the variable VARIABLE1.
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>
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>)
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With