Docker for Windows not working

2019-01-30 02:22发布

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

标签: docker
17条回答
冷血范
2楼-- · 2019-01-30 02:35

Delete and remove all old v.machines on your laptop: 1. Open VirtualBox, right click on 'default', Remove, 'Delete All files'. 2. Command Prompt (Run as Admin)> docker-machine rm default

Uninstall Virtualbox, Docker toolbox and Git. Navigate to c:\Users\Vinita, and delete dirs. .docker and .Virtualbox CClean files and registry. Reboot.

Cleaning is done.

I. Download latest version of Docker tools for windows (1.10.2) from Docker Toolbox Right click on the downloaded file and 'Run as administrator' This will install - Docker Quickstart, Kitematic and Virtualbox.

II. Download latest test build of VirtualBox (5.01.15-105696-win.exe) from Testbuilds – Oracle VM VirtualBox . Run as Administrator again.

(You can ignore any warnings and overwrite on the already Docker-installed VirtualBox).

So far, Nothing out of the ordinary. We just installed the software with Admin rights. Now, Control Panel>Network and Sharing Center>Change adapter settings: Right click VirtualBox Host-Only Network #2 for Properties. Check> VirtualBox NDIS6 Bridged Networking Driver. (If it is already checked, uncheck and check again.)

You are done. This is the only fix that we have employed!

Both Kitematic and Docker Quickstart should work now.

Right click on Kitematic and Run as admin the first time. Tested on Windows 10.

查看更多
相关推荐>>
3楼-- · 2019-01-30 02:38

I fixed my issue by simply Removing the default VM in the VirtualBox manager, rebooting PC (just in case), and then re-running Docker Quickstart Terminal. That's it.

Docker 1.8.2 and Virtual Box 5.0.4

查看更多
欢心
4楼-- · 2019-01-30 02:42
  1. Update to the latest virtual box above 5.0.3
  2. Restart the system
  3. open virtual box and remove the default virtual machine
  4. open the docker quick start terminal
  5. run docker run hello-world

And you are done.

查看更多
迷人小祖宗
5楼-- · 2019-01-30 02:43

The following worked for me (Docker Toolbox 1.8.1b and Windows 7). It is a simplified version of what @baptiste-gaillard outlined in the comments above. Short answer: Use VirtualBox 5.03 or later from the get-go.

  1. Download VirtualBox 5.03 (nightly build at the time of this post) and extension pack.
  2. Reboot laptop. (Clears out running VirtualBox stuff.)
  3. Install VirtualBox 5.03 and extension pack 5.03.
  4. Delete the default VM entirely (remove files).
  5. Re-run Docker Quickstart Terminal shortcut to generate the default VM.

The Quickstart script seems to get along better with VirtualBox 5.03 with regards to creating the requisite TLS keys.

查看更多
Ridiculous、
6楼-- · 2019-01-30 02:44
Close the virtual machine from Virtual Box (you don't have to delete it)
Close Kitematic
Close Docker Quickstart Terminal

Now do this in-order:

Open Kitematic
Open Docker Quickstart Terminal

Its important not to open Docker Quickstart Terminal before Kitematic, as Kitematic will initialize things for Docker Quickstart Terminal

I didn't need to execute any command line..

I hope this will help some body..

查看更多
冷血范
7楼-- · 2019-01-30 02:46

I too had the same problem, but I was able to solve it without having to type anything on the command line, it just worked out of the box.

It turns out a few initialization steps were missing, as pointed out in the accepted answer above. Why wasn't the default Docker installation already doing this? I also had missing certs. So, I uninstalled everything and restarted from scratch. However, after the installation completed, this time around do not open the Docker Quick Start terminal first, open Kitematic instead to do the first initialization for you.

Kitematic created the certs for me, set the missing env variables and then I opened the Docker Quick Start terminal. I typed docker run hello-world, then docker version and this time it worked as expected, no error messages.

Note that this didn't work when I opened the Quick Start terminal first.

I'm testing Docker inside VMWare 10 instances and I was able to duplicate this problem and its solution (workaround) in every case.

I hope this helps.

查看更多
登录 后发表回答