John Drinane
John Drinane

Reputation: 1426

Is there a docker log viewer or debug mode for windows?

It seems the Docker Desktop is always being updated and often with bugs so it is not working as it was previously. The default install on Windows is mostly a black box and you can look at the GUI, but it isn't very helpful in learning what is happening or where it is in starting when it says "restarting" for example. Preface of the question is that Docker is targeted towards developers, but then they wrap it into this dumbed down GUI that makes the service a black box to developers. I would prefer to start it some sort of debug mode in a console window and only when I want to interact via the GUI use those features. Is there a way to use docker from a more programmer friendly console interface on Windows?

Upvotes: 1

Views: 1216

Answers (1)

Ashok
Ashok

Reputation: 3611

Open an elevated command prompt and then run sc.exe qc docker to query the current configuration info for docker service.

From the output of the above command take the BINARY_PATH_NAME and modify it using the below steps.

1. Escape each " with \

2. Add -D at the end

3. Keep the whole command in " "

After modifying it run the command and then restart the docker service.

Example

  1. Let's say BINARY_PATH_NAME : "C:\Proram Files\Docker\dockerd.exe" --run-service

  2. After modifying it needs to be like this

    sc.exe config docker binpath= "\"C:\Program Files\Docker\dockerd.exe\" --run-service -D"

  3. After executing the above commands restart the docker service.

    sc.exe stop docker

    sc.exe start docker

Upvotes: 1

Related Questions