Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run docker from windows. #636

Open
NimmiW opened this issue Mar 18, 2017 · 90 comments

Comments

@NimmiW
Copy link

commented Mar 18, 2017

I installed docker windows toolkit and enabled the BIOS virtualization.

docker version gives the following:

Client: Version: 17.03.0-ce API version: 1.26 Go version: go1.7.5 Git commit: 60ccb22 Built: Thu Mar 2 01:11:00 2017 OS/Arch: windows/amd64 error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/version: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Now I am getting this error when trying to docker docker ps

error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

@NimmiW

This comment has been minimized.

Copy link
Author

commented Mar 18, 2017

Can someone help me with this. I am a beginner.

@paladinram

This comment has been minimized.

Copy link

commented Mar 22, 2017

Same problem downloaded docker windows tool kit latest one yesterday and trying to do the installation in windows 10 and enabled BIOs
facing error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Please help.. tried with many forums no luck

@bacongobbler

This comment has been minimized.

Copy link

commented Mar 23, 2017

Can you both confirm that you have a vm running under docker-machine? Usually that error indicates that you have the client installed but don't have an engine running.

From within cmder:

λ set | grep DOCKER
DOCKER_CERT_PATH=C:\Users\bacongobbler\.docker\machine\machines\deis
DOCKER_HOST=tcp://192.168.99.100:2376
DOCKER_MACHINE_NAME=deis
DOCKER_TLS_VERIFY=1
DOCKER_TOOLBOX_INSTALL_PATH=C:\Program Files\Docker Toolbox

λ docker-machine ls
NAME   ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER        ERRORS
deis   *        virtualbox   Running   tcp://192.168.99.100:2376           v17.03.0-ce

λ docker ps -a
time="2017-03-23T11:11:55-07:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

λ docker pull busybox
time="2017-03-23T11:13:07-07:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"
Using default tag: latest
latest: Pulling from library/busybox
7520415ce762: Pull complete
Digest: sha256:32f093055929dbc23dec4d03e09dfe971f5973a9ca5cf059cbfb644c206aa83f
Status: Downloaded newer image for busybox:latest
@paladinram

This comment has been minimized.

Copy link

commented Mar 23, 2017

I installed only the docker toolbox.. didn't download any docker machine separately. please guide

@bacongobbler

This comment has been minimized.

Copy link

commented Mar 23, 2017

It's part of the docker toolbox. Use docker-machine create box.

@paladinram

This comment has been minimized.

Copy link

commented Mar 23, 2017

ok, I will create it now

@bacongobbler

This comment has been minimized.

Copy link

commented Mar 23, 2017

I'm going to un-sub from this discussion, but please make sure to follow the official documentation as descibed in great detail here: https://docs.docker.com/toolbox/toolbox_install_windows/

I'm not a Docker dev, just some bum who decided to try out Docker on Windows. Cheers.

@paladinram

This comment has been minimized.

Copy link

commented Mar 23, 2017

ok, Thanks

@paladinram

This comment has been minimized.

Copy link

commented Mar 23, 2017

just a qq: I done with machine.I can see the machine version too.. but when I execute docker ps
facing error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.26/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

getting same error..

@bacongobbler

This comment has been minimized.

Copy link

commented Mar 23, 2017

Did you set the environment variables as suggested? See my comment above on set output. Those can be fetched with docker-machine env box.

Please follow through the documentation.

@paladinram

This comment has been minimized.

Copy link

commented Mar 23, 2017

Yes, please see below:
C:\Users\xxxxx>set DOCKER
DOCKER_CERT_PATH=C:\Users\Tarangini.docker\machine\machines\deis
DOCKER_HOST=tcp://192.168.99.1:50675
DOCKER_MACHINE_NAME=deis
DOCKER_TLS_VERIFY=1
DOCKER_TOOLBOX_INSTALL_PATH=C:\Program Files\Docker Toolbox

@paladinram

This comment has been minimized.

Copy link

commented Mar 23, 2017

C:\Users\Tarangini>docker ps
time="2017-03-23T15:59:43-05:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"
could not read CA certificate "C:\Users\Tarangini\.docker\machine\machines\deis\ca.pem": open C:\Users\Tarangini.docker\machine\machines\deis\ca.pem: The system cannot find the file specified.

@paladinram

This comment has been minimized.

Copy link

commented Mar 23, 2017

Appreciating your help for the beginners.. you can see what am getting

C:\Users\Tarangini>docker run hello-world
time="2017-03-23T16:05:42-05:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"
could not read CA certificate "C:\Users\Tarangini\.docker\machine\machines\deis\ca.pem": open C:\Users\Tarangini.docker\machine\machines\deis\ca.pem: The system cannot find the file specified.

@paladinram

This comment has been minimized.

Copy link

commented Mar 23, 2017

Tarangini@Tara MINGW64 ~
$ docker -v
time="2017-03-23T16:35:39-05:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"
could not read CA certificate "C:\Users\Tarangini\.docker\machine\machines\deis\ca.pem": open C:\Users\Tarangini.docker\machine\machines\deis\ca.pem: The system cannot find the file specified.

Tarangini@Tara MINGW64 ~
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default virtualbox Timeout
deis virtualbox Timeout

Tarangini@Tara MINGW64 ~
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default virtualbox Timeout
deis virtualbox Timeout

Tarangini@Tara MINGW64 ~
$ docker-machine env
Error checking TLS connection: ssh command error:
command : ip addr show
err : exit status 255
output :

Tarangini@Tara MINGW64 ~

@ntomer

This comment has been minimized.

Copy link

commented May 11, 2017

Try using the default 'Docker Quickstart Terminal' shortcut to run your commands. That worked for me.

@popey456963

This comment has been minimized.

Copy link

commented Jul 3, 2017

@ntomer That works, but isn't optimal for people who use an external command prompt, like cmder.exe.

@ngetahun

This comment has been minimized.

Copy link

commented Jul 12, 2017

@paladinram make sure the docker machine default name is 'deis'.

@sebastiansterk

This comment has been minimized.

Copy link

commented Jul 26, 2017

Try this, solved my problem:

docker-machine env --shell cmd default 
@FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd default') DO @%i

Replace "default" by your docker VM name

@nsidhaye

This comment has been minimized.

Copy link

commented Aug 6, 2017

Thanks @owhen

docker-machine env --shell cmd default 
@FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd default') DO @%i

works

@siran

This comment has been minimized.

Copy link

commented Aug 11, 2017

Im on Win10 but I tried installing Docker Toolbox and running

docker run hello-world

But the error is issued:
docker: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.30/containers/create: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
See 'docker run --help'.

Already tried many suggestions of this thread, but its still no working.

Any ideas?

@adrianwright

This comment has been minimized.

Copy link

commented Aug 16, 2017

I encountered this because I had disabled the Hyper-V service in Windows so that I could run VirtualBox. After a reboot, Docker notified me that the service needed to be running (which would keep VirtualBox from functioning). This resolved the issue.

@siran

This comment has been minimized.

Copy link

commented Aug 16, 2017

Hyper-V apparently is for Windows 10. I'm trying to use Docker Toolbox because we need support for older versions of Windows, not only 10. I still can't run hello-world as described in Docker Toolbox's documentation

@jsmithe

This comment has been minimized.

Copy link

commented Aug 22, 2017

@siran While using Docker Toolbox installation are attempting commands from the Docker Quickstart Terminal or something else? If you are using another terminal try 'docker-machine ssh default' (assuming you are using default). From their you can run 'docker images', 'docker info', 'docker ps', etc.

@vinayk8125

This comment has been minimized.

Copy link

commented Aug 31, 2017

try after install the virtualbox in "Program Files\Docker Toolbox\installers\virtualbox\virtualbox.msi"

@IllyaMoskvin

This comment has been minimized.

Copy link

commented Sep 4, 2017

I was getting this error. The approximate steps I took are as follows:

  1. Run Kitematic (Alpha) and choose to create the Docker VM.
  2. Run cd "/c/path/to/docker toolbox"; ./start.sh in your terminal

I had to run Kitematic twice, since the first time it ran out of buffer or something to that effect. The operation completed successfully on my second try.

The "Docker Quickstart Terminal" shortcut just runs start.sh, so if you are using a different command prompt (e.g. cmder.exe), just change your shortcut target as follows:

"C:\path\to\cmder.exe" -c "cd '/c/path/to/docker toolbox'; ./start.sh"

There's a related issue where start.sh will not run when you are not within its directory, thus you need to cd into wherever you've installed Docker Toolbox in order to get it to work, until that issue is resolved (#687). Just make sure to quote your paths if they contain spaces.

@angelopolotto

This comment has been minimized.

Copy link

commented Sep 4, 2017

I followed the @bacongobbler answer and I make some changes to work with Docker inside the PowerShell. I using Docker Tools on Windows 7.

First, list all machines: docker-machine ls
If you don't have one, you can create one with: docker-machine create default
Start the machine, if stopped: docker-machine start default
Connect with machine via SSH: docker-machine ssh default

Now, you can use the docker inside the PowerShell or even inside the Hyper (https://hyper.is).

@navarq

This comment has been minimized.

Copy link

commented Sep 8, 2017

This problem occurred after the recent update.

I am using windows 10 pro

Simply restarting my machine solved the issue.

@mohdamir

This comment has been minimized.

Copy link

commented Sep 8, 2017

I have moved the docker bin path to last in PATH environment variable and this worked for me.

@lijo-george

This comment has been minimized.

Copy link

commented Sep 27, 2017

For me, this error was resolved after I removed 'daemon.json' file in "%programdata%\docker\config"

The content in my 'daemon.json' is the following:

{

"hosts": ["tcp://0.0.0.0:2375"]

}

I created this manually as part of some testing. But after I restarted the server, I started to get the error in this question

@vasidzius

This comment has been minimized.

Copy link

commented Sep 6, 2018

I had the same issue with Windows 10. Firstly I setup Docker Toolbox, then run Docker Quickstart Terminal. ...Profit!

@Vvaltz

This comment has been minimized.

Copy link

commented Sep 12, 2018

@for /f "tokens=*" %i IN ('docker-machine env --shell cmd default') DO @%i

Worked for me, thank you very much;
Although I have to do this every single time I start working with docker ?
Any global/default way?

e.x. I'm using cmder, and I have a very simple script (start.sh):

#!/bin/bash

docker-machine start box
docker-machine env box
@for /f "tokens=*" %i IN ('docker-machine env') DO @%i
docker-compose up

The "@for... " part doesn't really work, as it shouldn't I believe, since it's not really configuring my current shell (cmder)? Any suggestions ? Appreciated

@zeyad82

This comment has been minimized.

Copy link

commented Sep 24, 2018

@Vvaltz this is how I managed to run it automatically when I open cmder.

In config/user-profile.cmd, I added this:

FOR /F "tokens=* USEBACKQ" %%F IN (`docker-machine status`) DO (
	SET machine_status=%%F
)


IF NOT %machine_status% == Running (
	cmd /c "docker-machine start default"
) 

FOR /F "tokens=*" %%i in ('docker-machine env') do @%%i
@shaijujanardhanan

This comment has been minimized.

Copy link

commented Sep 26, 2018

The following answer helped me:

The boot2docker.iso should be located under c:\user\USERNAME.docker\machine\cache

https://forums.docker.com/t/pre-create-check-failed-when-first-time-launch-docker-quickstart-terminal/9977

@extraneu

This comment has been minimized.

Copy link

commented Sep 28, 2018

The first thing to do is to run your command with '--verbose', as error handling is lacking in some places, and some commands just print some generic OS error (i.e. "file not found"). In my case "the file not found" was the configuration file; turns out the env variables were not configured because the docker 'default' VM was inaccessible, apparently because of some error in the toolbox installer. That was fixed with this tip: #453 (comment)

@dvelopp

This comment has been minimized.

Copy link

commented Oct 14, 2018

This commands helped:

docker-machine create box
docker-machine env box

Thank you!

@engsamhan

This comment has been minimized.

Copy link

commented Nov 21, 2018

Tarangini@Tara MINGW64 ~
$ docker -v
time="2017-03-23T16:35:39-05:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"
could not read CA certificate "C:\Users\Tarangini.docker\machine\machines\deis\ca.pem": open C:\Users\Tarangini.docker\machine\machines\deis\ca.pem: The system cannot find the file specified.

Tarangini@Tara MINGW64 ~
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default virtualbox Timeout
deis virtualbox Timeout

Tarangini@Tara MINGW64 ~
$ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default virtualbox Timeout
deis virtualbox Timeout

Tarangini@Tara MINGW64 ~
$ docker-machine env
Error checking TLS connection: ssh command error:
command : ip addr show
err : exit status 255
output :

Tarangini@Tara MINGW64 ~

https://docs.docker.com/v17.09/toolbox/faqs/troubleshoot/#solutions in this link will find the answer
just type -> $ docker-machine regenerate-certs default

@peter-hartmann-emrsn

This comment has been minimized.

Copy link

commented Nov 30, 2018

As the error says "This error may also indicate that the docker daemon is not running" - starting docker service did the trick for me:

net start docker
@sayed-ali

This comment has been minimized.

Copy link

commented Jan 4, 2019

I had the same problem on windows, running docker as an administrator solved the issue

@mhdyahiya

This comment has been minimized.

Copy link

commented Jan 16, 2019

I also encountered this issue on my windows 10.

  1. Restart you Docker Desktop as administrator
  2. Wait for the docker to the running state.
  3. After that check, run command prompt in administrator mode.
    This worked fine for me.
@shreedhargowda

This comment has been minimized.

Copy link

commented Jan 16, 2019

Im on Win10 but I tried installing Docker Toolbox and running

docker run hello-world

But the error is issued:
docker: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.30/containers/create: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
See 'docker run --help'.

Already tried many suggestions of this thread, but its still no working.

Any ideas?

May be its too late but issue seems to be proxy settings. Goto Docker Settings, from your desktop trey right click on docker icon, Settings and navigate to Proxies, and set your organization proxy or whatever the proxy you use. Restart the docker engine and check.

@Miciah1

This comment has been minimized.

Copy link

commented Feb 2, 2019

Docker for Windows

Unfortunately, I have encountered this problem. The error was verbatim. Make sure you are signed in so you can pull images from the docker hub. From the docker tray icon switch to Windows containers.
Open an ELEVATED { Windows Terminal / Standard Command Prompt) .
pull your first image: using the command below.

docker run hello-world

@jesusresiliencia

This comment has been minimized.

Copy link

commented Feb 4, 2019

Hi I had a similar error, I could resolved that.
I open Docker desktop as administrator.
This is useful for me.

@megahoy

This comment has been minimized.

Copy link

commented Feb 25, 2019

I ran Docker Desktop as Administrator, the same is for PowerShell - and error disappeared.

@tmithun

This comment has been minimized.

Copy link

commented Mar 22, 2019

Kill the docker from the task manager and run it again as admin...it solved my problem

@luisfernandogp

This comment has been minimized.

Copy link

commented Apr 11, 2019

My problem was because, I installed docker toolbox. I unistalled it, and the I installed docker for windows.

I had to unistall docker for windows remove the ~/.docker, and delete all DOCKER enviroment variables.
It solved my problem.

@ni-reis

This comment has been minimized.

Copy link

commented Apr 15, 2019

What worked for me was:
1 - https://success.docker.com/article/docker-for-windows-fails-with-a-daemon-not-running-message
2 - Opening hyper-v manager and restarting any VM related to docker
3 - restarting docker desktop and restart computer

Not sure if all steps are needed though XD

@ZiadJ

This comment has been minimized.

Copy link

commented Apr 27, 2019

The VM was actually running in a Windows OS rather than Linux for me so clicking on the Switch to Linux Containers menu solved it on my machine. Hope that helps someone in the same situation.

@ibenjelloun

This comment has been minimized.

Copy link

commented Apr 29, 2019

I had this error while trying to start my docker environment :

ERROR: Windows named pipe error: The system cannot find the file specified. (code: 2)

A look into the Hyper-V Manager and the MobyLinuxVM was not created.
What I did to fix : I just quitted Docker Desktop and started it again.

Windows 10/Docker For Windows

@olisteadman

This comment has been minimized.

Copy link

commented May 22, 2019

For me the error was resolved by stopping a virtual Ubuntu instance that'd been running in Hyper-V:

The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

Once Ubuntu instance had been stopped, and Docker Desktop had been restarted, my usual docker commands ran just fine.

PS: I had the idea to try this because of an Error Log that Docker Desktop had helpfully compiled and offered to send to Docker Hub as user feedback... the log appeared to indicate that my machine was short on RAM, and Docker was failing for this very simple reason. Killing the Ubuntu instance solved that.

@privojaime

This comment has been minimized.

Copy link

commented May 31, 2019

Ran into this issue trying to just run docker info

The only solution that worked for me was...

Turn on Docker Desktop
Open Powershell with 'Run as Administrator'

Everything else threw this error.

@mabez

This comment has been minimized.

Copy link

commented Jun 11, 2019

My case, I removed the VM and recreated it trhow the commands:
$ docker-machine rm default
$ docker-machine create default

@elycheikh1

This comment has been minimized.

Copy link

commented Jun 28, 2019

I think you should run docker you install it but it is not running. I had the same issue when I run "docker container ls --all"
After running the docker the issue disappear . I am on windows 10

@mayankgaur

This comment has been minimized.

Copy link

commented Jul 3, 2019

I have resolved this issue by following steps
A.

  1. Start-Service “Hyper-V Virtual Machine Management”
  2. Start-Service "Hyper-V Host Compute Service"

OR

B. If you get any error then apply below steps:-

1, Open "Window Security"

2, Open "App & Browser control"

3, Click "Exploit protection settings" at the bottom

4, Switch to "Program settings" tab

5, Locate "C:\WINDOWS\System32\vmcompute.exe" in the list and expand it

6, Click "Edit"

7, Scroll down to "Code flow guard (CFG)" and uncheck "Override system settings"

8, Start vmcompute from powershell "net start vmcompute"

Then Please restart your system

@just-tool

This comment has been minimized.

Copy link

commented Jul 19, 2019

docker-machine ls
in case you don't have a running machine
docker-machine start
then execute
docker-machine env | Invoke-Expression
or specify machine name
docker-machine env machine_name | Invoke-Expression

@fkromer

This comment has been minimized.

Copy link

commented Aug 2, 2019

@just-tool I followed the installation instructions but the your solution does not work for me and I didn't find a reason for that so far. Have you stumbled over this issue as well?

PS C:\Users\Florian> docker
<docker cli help is displayed like expected>
PS C:\Users\Florian> docker-machine ls
NAME   ACTIVE   DRIVER   STATE   URL   SWARM   DOCKER   ERRORS
PS C:\Users\Florian> docker-machine start
Error: No machine name(s) specified and no "default" machine exists

Seems to be a quite common issue. Would be great to find some hints about this topic in the official docs in case the issue has been closed and a single solution has been found which works for everyone.

BTW: Does anyone know if Docker for Windows (for Win 10 Pro/Enterprise, instead of for Win 10 Home) can be setup without issues right away?

@fkromer

This comment has been minimized.

Copy link

commented Aug 5, 2019

When I installed Windows Toolbox the first time the desktop icon "Docker Quickstart Terminal" did not work. Unfortunatelly I don't know what error was returned when I tried to run via the icon back then. The commands don't work when they are executed in PS. The commands do only work in the terminal which is created when executing the desktop icon cause it spawns a bash using MINGW. The second time I installed Docker Toolbox I selected "Docker Compose for Windows", "VirtualBox" and "Git for Windows". The first time I did not select "Git for Windows" during installation. Seems like the MINGW environment is installed implicitly with this last option. At least docker run hello-world runs now.

@fkromer

This comment has been minimized.

Copy link

commented Aug 8, 2019

BTW: Does anyone know if Docker for Windows (for Win 10 Pro/Enterprise, instead of for Win 10 Home) can be setup without issues right away?

As I had no trouble with "Docker for Windows" at all and due a lot of other advantages (no legacy software, native virtualization with Hyper-V instead of Docker Container in VirtualBox VM, native Docker Engine for Windows instead of Docker Engine for Linux running in boot2docker, etc.) I highly recommend to use it instead of "Docker Toolbox".

@guandaxia

This comment has been minimized.

Copy link

commented Aug 14, 2019

I use babun.exe on Windows 10 , docker-toolbox

 eval $(docker-machine env default)

is worked for me.

if use cmd.exe

@FOR /f "tokens=*" %i IN ('docker-machine env default') DO @%i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.