Can't check DockerDesktop logs on Windows 11

My first container pulled from the Docker hub stops running about 1 second after starting it, It’s an Ubuntu 22.04 container running on a Windows 11 machine that has been setup per Docker documentation… After further consulting the Docker documentation on trouble shooting I found how to view the logs “see attached .png”.

However the command presented in the documentation does not work and gives me the error message below.

PS C:\WINDOWS\system32> code $Env:LOCALAPPDATA\Docker\log
code : The term ‘code’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • code $Env:LOCALAPPDATA\Docker\log
  •   + CategoryInfo          : ObjectNotFound: (code:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

I’m new to the Docker world so any insight on why my container stops or why I can’t get to the logs would be greatly appreciated.

I guess the documentation assumes you have Visual Studio Code installed on your Windows. If you know any other command that opens an editor, you can replace “code” with that.

Don’t ask me why the documentation says the “code” command would use your prefered text editor. Maaybe it is the preferred of the person who wrote the instructions :slight_smile:

Or maybe there is a “code” command in newer Powershells that I don’t know about.

Thank you for your help rimelek. I was able to open the log files.