I've installed Docker toolbox now and I get the error for everything:
Get http://127.0.0.1:2375/v1.20/version: dial tcp 127.0.0.1:2375: ConnectExtcp: No connection could be made because the target machine actively refused it..
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?
docker version
output:
Client:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 02:49:29 UTC 2015
OS/Arch: windows/amd64
Get http://127.0.0.1:2375/v1.20/version: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the target machine actively refused it..
* Are you trying to connect to a TLS-enabled daemon without TLS?
* Is your docker daemon up and running?
But the VM is running under VirtualBox. I have searched everywhere but can't find a solution.
UPDATE1: I'm using Windows 8.1 and also tried to start through Kinematic also.
UPDATE2: Everything worked like charm when I tried Virtualbox Test Build 5.0.3 or later. You can download here: https://www.virtualbox.org/wiki/Testbuilds
Just run:
get the machine name, and then run:
and you should get something like this:
I also get an error
open C:\Users\X\.docker\machine\machines\default\server.pem: The system cannot find the file specified.
and solved it by upgrading my VirtualBox to version 5.0.3 (from their nightly builds)Long version:
I got the same problem and after and the "Using Docker from Windows Command Line Prompt (cmd.exe)" section from the installation manual put me in the right direction
Basically, the way docker works is that the "docker " commands are passed to a docker service (running on port 2375). As you are running the docker from windows host, the service actually runs on the linux host created by docker (you can see it by opening the virtualbox ui).
The usual flow is the following:
docker ...
commands are send to the linux host and everything works almost as native linuxThe problem is that there is some issue with the machine setup (my guess the new virtual box but I am not sure and have the time to dig into it). You can see that by runnung the
ls
command and notice that (at least in my case) the state of the machine is "timeout" and there is no url, unlike the output shown in the manual.This causes the enviorment values not to be set and the
docker ...
commands to fail.Apart from running the command, you can also start the
Docker Quickstart Terminal
that does the same thing but with sh shellRegarding the certificate error, I tried to regenrate the certificates from within the virtual machine using:
I got "protocol error"s when tried to copy the certificate to the host machine, which reminded me an old virtualbox shared folders bug, so this may not be a problem with docker but with virtualbox - I upgraded to the latest nightly version (5.0.3-102224), regenerated the default image and that seems to solve it. As windows 10 is not officially supported yet neither by docker nor by virtualbox, I am not sure if this is the same thing that causes you to get the certificate error, In any case can try to copy the certificates from the virtual machine (you have the paths in code block) to your local user directory (it is mapped to /c/Users/X/ in the virtual machine)
Just recreate the default machine, and then run
It works for me.
This has happened a few times for me on Windows 10 with VirtualBox 5.0.14.
It seems to be related with not shutting down VirtualBox correctly (I believe) - for example, a power cut!
Shutdown the Docker VM
Close Kitematic
Start the Docker Quickstart Terminal
Type in the terminal:
If that does not work, try 1-3 again and this time try to regenerate certs. Then do step 4.
One thing that is odd, is that in the terminal
docker images
does not list them but says it cannot connect to 127.0.0.1:2375 (butdocker-machine ls
shows the default machine running on 192.168.99.100:2376).Had the same issue as you showed and Just fixed it a few hours ago.
All need to do is disable Hyper-V. Run a command prompt with administrator rights and run the following command:
Restart your PC, open virtualbox and delete default vm after relaunch, go back to docker quickstart terminal and put the following in command:
and you're done! Hope it solves your problem
this works for me
1) start the command line tool first and get the machine ip address by running
docker-machine ls command
2) Re-generate certs docker-machine regenerate-certs
3) Set the evn variables manually in my case the location of certs was different
set DOCKER_TLS_VERIFY=1
set DOCKER_HOST=tcp://machine_IP:2376
set DOCKER_CERT_PATH=C:\Users\X.docker\machine\certs
set DOCKER_MACHINE_NAME=default
Now run docker version
Here is the output in my case
Client: Version: 1.8.1 API version: 1.20 Go version: go1.4.2 Git commit: d12ea79 Built: Thu Aug 13 02:49:29 UTC 2015 OS/Arch: windows/amd64
Server: Version: 1.8.1 API version: 1.20 Go version: go1.4.2 Git commit: d12ea79 Built: Thu Aug 13 02:49:29 UTC 2015 OS/Arch: linux/amd64
The Docker Toolbox (in 1.8.x) installation configure by default your Docker Daemon to use secure connection via the TLS protocol (version 1.8).
If you were using an older version of the daemon that wasn't secured that means at least two things : - the port number changed from 2375 to 2376 - your daemon client need to present a certificat to communicate with you docker engine/server.
So the reply of sandiindia indicates the environment variables that precise to the docker client the good configuration to connect to the docker server/engine:
The docker documentation about TLS configuration : https://docs.docker.com/articles/https/
I hope it helps ;)