Docker Community Forums

Share and learn in the Docker community.

Restart Docker service from command line

docker

(Eivantsov) #1

Hello,

I am trying to stop, start and restart com.docker.service from Windows PowerShell as admin,

PS C:\Windows\system32> net stop com.docker.service
The Docker for Windows Service service is stopping.
A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.

The Docker for Windows Service service was stopped successfully.

PS C:\Windows\system32> net start com.docker.service
The Docker for Windows Service service is starting.
The Docker for Windows Service service was started successfully.

PS C:\Windows\system32> docker ps
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.25/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 ma
y also indicate that the docker daemon is not running.
PS C:\Windows\system32>

Does anyone know the correct way to restart Docker as a service on Windows 10? Thanks


Error loading image
(Artisticcheese) #2

From powershell prompt following works for me with no issues

restart-service *docker*


(Michael Friis) #3

If you’re using Docker for Windows, that comes with it’s own restart and reset in the gui:

What’s going wrong that requires restarts?


(Ryan Cole) #4

Hi Michael (@friism),

What GUI is this in your screenshot? I’m using docker for windows. I don’t seem to have this GUI anywhere.

Thanks!


(Jarwe) #5

After you right clicking docker’s icon in task bar. you’ll see ‘setting’ item in list. it would be open that GUI.


(Raikard) #6

image

When I installed, I got the “Docker Quickstart Terminal”.

You can use this to start/restart.


(Nehalbhanushali) #7

Docker Quickstart Terminal comes with Docker Toolbox. Docker toolbox is for older PCs , the latest ones need “Docker for windows” which does not have the Docker Quickstart Terminal. Also, the services show that docker is running, and so does “net start com.docker.service”. But still there is the following error while running docker commands:
“error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.32/images/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.”


(Vladkras) #8

I don’t have GUI but I use Docker QuickStart Terminal and

docker-machine restart

helps


(Zingyrajeev) #9

following. let me know if this is resolved, I am also facing same problem since one month. Not able to fix it till today.


(Philip Lin) #10

I am using Windows 10 Pro N 1803 VM running in Azure. After I restarted com.docker.service, I got the exactly same error message. I tried to use Docker GUI to restart docker, but it doesn’t help. Finally I figured out there are 2 ways to get back Docker to normal.

Solutions
#1 Use Docker GUI to quit docker first; then just run “Docker for Windows.exe”.
#2 Use Docker GUI to reset docker.

Is there possible I can call quit or reset docker from Command Line? I am being blocked for 2 weeks, your help is much appreciated.