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

Extension doesn't recognize Docker Desktop #3811

Closed
dschuessler opened this issue Jan 25, 2023 · 10 comments
Closed

Extension doesn't recognize Docker Desktop #3811

dschuessler opened this issue Jan 25, 2023 · 10 comments
Labels

Comments

@dschuessler
Copy link

dschuessler commented Jan 25, 2023

Docker Desktop is installed and running. Yet the extension pretends that it is not and suggests that I install it.

Bildschirmfoto 2023-01-25 um 16 24 53

macOS: 12.6
VSCode: 1.74.3
Docker extension: 1.23.3

EDIT: Output of Docker extension:

Failed to set up event listener: spawn docker ENOENT
@bwateratmsft
Copy link
Collaborator

Probably the same issue as #3806 or #3783. We're seeing a lot of cases where some part of the environment is breaking down. We think it might be external: microsoft/vscode#172124

@bwateratmsft
Copy link
Collaborator

@dschuessler are you able to run docker commands within a VSCode terminal window? e.g. docker -v?

@danegsta
Copy link
Contributor

Our latest nightly build has support for additional diagnostic logging to help troubleshoot this issue. If anyone running into this problem is willing to install the nightly build (see #1408 for instructions on installing nightly builds) and provide debug logs, that would be a big help. To install the latest nightly, you'll need to be on at least version 1.74.0 of VS Code.

To enable debug logging for the Docker extension, open the VS Code command palette (ctrl+shift+p on Windows and Linux) and run the Developer: Set Log Level... command. Select debug from the subsequent menu to enable debug level logs, and then make sure you have the Docker extension view open.

To ensure the logs capture enough events to assist in troubleshooting, click on the refresh icons for at least the CONTAINERS and IMAGES Docker resource views. Finally, open the command palette again and run the Developer: Open Log File... command and select Docker from the list of logs. This should open a tab with diagnostics logging from the Docker extension. If this looks like it's captured enough Docker command output (you should see entries for docker container ls and docker image ls at least), you can reset your log level setting to the default of info or any other value you prefer (Developer: Set Log Level... on the command palette).

Take the generated log output, remove any personal/secret information, save it to disk somewhere, and then email it to my github alias (danegsta) @microsoft.com. Please DO NOT share the logs directly in the issue comments on the off chance that they still contain personal information.

@AzCode-Bot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@AzCode-Bot AzCode-Bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2023
@dschuessler
Copy link
Author

Followed the instructions of @danegsta and got the following logs on reloading the window.

2023-02-15 11:52:40.753 [error] Failed to set up event listener: spawn docker ENOENT
2023-02-15 11:53:00.039 [debug] --- Process Environment (24) ---
2023-02-15 11:53:00.039 [debug] COMMAND_MODE: unix2003
2023-02-15 11:53:00.039 [debug] HOME: /Users/xxx
2023-02-15 11:53:00.039 [debug] LOGNAME: xxx
2023-02-15 11:53:00.039 [debug] LaunchInstanceID: 11AB3AB4-19A6-4C5F-91EF-D868A7BBAD2C
2023-02-15 11:53:00.039 [debug] MallocNanoZone: 0
2023-02-15 11:53:00.039 [debug] ORIGINAL_XDG_CURRENT_DESKTOP: undefined
2023-02-15 11:53:00.039 [debug] PATH: /usr/bin:/bin:/usr/sbin:/sbin
2023-02-15 11:53:00.039 [debug] SECURITYSESSIONID: 186a3
2023-02-15 11:53:00.039 [debug] SHELL: /bin/bash
2023-02-15 11:53:00.039 [debug] SSH_AUTH_SOCK: /private/tmp/com.apple.launchd.mtIiGqgVW2/Listeners
2023-02-15 11:53:00.039 [debug] TMPDIR: /var/folders/dz/xfs1jxhd06g0vvb9v1n1wh8r0000gn/T/
2023-02-15 11:53:00.039 [debug] USER: xxx
2023-02-15 11:53:00.039 [debug] VSCODE_AMD_ENTRYPOINT: vs/workbench/api/node/extensionHostProcess
2023-02-15 11:53:00.039 [debug] VSCODE_CODE_CACHE_PATH: /Users/xxx/Library/Application Support/Code/CachedData/441438abd1ac652551dbe4d408dfcec8a499b8bf
2023-02-15 11:53:00.039 [debug] VSCODE_CWD: /
2023-02-15 11:53:00.039 [debug] VSCODE_HANDLES_UNCAUGHT_ERRORS: true
2023-02-15 11:53:00.039 [debug] VSCODE_IPC_HOOK: /Users/xxx/Library/Application Support/Code/1.75.1-main.sock
2023-02-15 11:53:00.039 [debug] VSCODE_NLS_CONFIG: {"locale":"en","availableLanguages":{},"_languagePackSupport":true}
2023-02-15 11:53:00.039 [debug] VSCODE_PID: 1963
2023-02-15 11:53:00.039 [debug] XPC_FLAGS: 0x0
2023-02-15 11:53:00.039 [debug] XPC_SERVICE_NAME: application.com.microsoft.VSCode.63834620.63834626
2023-02-15 11:53:00.039 [debug] __CFBundleIdentifier: com.microsoft.VSCode
2023-02-15 11:53:00.039 [debug] __CF_USER_TEXT_ENCODING: 0x1F5:0x0:0x3
2023-02-15 11:53:00.039 [debug] ELECTRON_RUN_AS_NODE: 1
2023-02-15 11:53:00.039 [debug] --- Docker Environment (0) ---
2023-02-15 11:53:33.896 [debug] docker container ls --all --no-trunc --format {{json .}}
2023-02-15 11:53:38.525 [debug] docker image ls --filter dangling=false --no-trunc --format {{json .}}
2023-02-15 11:53:40.879 [debug] docker container ls --all --no-trunc --format {{json .}}
2023-02-15 11:53:40.881 [debug] docker image ls --filter dangling=false --no-trunc --format {{json .}}
2023-02-15 11:54:25.120 [debug] --- Process Environment (24) ---
2023-02-15 11:54:25.120 [debug] COMMAND_MODE: unix2003
2023-02-15 11:54:25.120 [debug] HOME: /Users/xxx
2023-02-15 11:54:25.120 [debug] LOGNAME: xxx
2023-02-15 11:54:25.120 [debug] LaunchInstanceID: 11AB3AB4-19A6-4C5F-91EF-D868A7BBAD2C
2023-02-15 11:54:25.120 [debug] MallocNanoZone: 0
2023-02-15 11:54:25.120 [debug] ORIGINAL_XDG_CURRENT_DESKTOP: undefined
2023-02-15 11:54:25.120 [debug] PATH: /usr/bin:/bin:/usr/sbin:/sbin
2023-02-15 11:54:25.120 [debug] SECURITYSESSIONID: 186a3
2023-02-15 11:54:25.120 [debug] SHELL: /bin/bash
2023-02-15 11:54:25.120 [debug] SSH_AUTH_SOCK: /private/tmp/com.apple.launchd.mtIiGqgVW2/Listeners
2023-02-15 11:54:25.120 [debug] TMPDIR: /var/folders/dz/xfs1jxhd06g0vvb9v1n1wh8r0000gn/T/
2023-02-15 11:54:25.120 [debug] USER: xxx
2023-02-15 11:54:25.120 [debug] VSCODE_AMD_ENTRYPOINT: vs/workbench/api/node/extensionHostProcess
2023-02-15 11:54:25.120 [debug] VSCODE_CODE_CACHE_PATH: /Users/xxx/Library/Application Support/Code/CachedData/441438abd1ac652551dbe4d408dfcec8a499b8bf
2023-02-15 11:54:25.120 [debug] VSCODE_CWD: /
2023-02-15 11:54:25.120 [debug] VSCODE_HANDLES_UNCAUGHT_ERRORS: true
2023-02-15 11:54:25.120 [debug] VSCODE_IPC_HOOK: /Users/xxx/Library/Application Support/Code/1.75.1-main.sock
2023-02-15 11:54:25.120 [debug] VSCODE_NLS_CONFIG: {"locale":"en","availableLanguages":{},"_languagePackSupport":true}
2023-02-15 11:54:25.120 [debug] VSCODE_PID: 1963
2023-02-15 11:54:25.120 [debug] XPC_FLAGS: 0x0
2023-02-15 11:54:25.120 [debug] XPC_SERVICE_NAME: application.com.microsoft.VSCode.63834620.63834626
2023-02-15 11:54:25.120 [debug] __CFBundleIdentifier: com.microsoft.VSCode
2023-02-15 11:54:25.120 [debug] __CF_USER_TEXT_ENCODING: 0x1F5:0x0:0x3
2023-02-15 11:54:25.120 [debug] ELECTRON_RUN_AS_NODE: 1
2023-02-15 11:54:25.120 [debug] --- Docker Environment (0) ---
2023-02-15 11:54:25.120 [debug] docker.dockerPath: docker
2023-02-15 11:54:25.120 [debug] docker container ls --all --no-trunc --format {{json .}}
2023-02-15 11:54:25.120 [debug] docker -v
2023-02-15 11:54:25.121 [debug] docker events --since 1676458465 --until 1676458765 --filter type=container --filter type=image --filter type=network --filter type=volume --filter event=create --filter event=destroy --filter event=die --filter event=kill --filter event=pause --filter event=rename --filter event=restart --filter event=start --filter event=stop --filter event=unpause --filter event=update --filter event=delete --filter event=import --filter event=load --filter event=pull --filter event=save --filter event=tag --filter event=untag --filter event=remove --filter event=prune --format {{json .}}
2023-02-15 11:54:25.121 [debug] docker image ls --filter dangling=false --no-trunc --format {{json .}}
2023-02-15 11:54:25.121 [debug] docker events --since 1676458765 --until 1676459065 --filter type=container --filter type=image --filter type=network --filter type=volume --filter event=create --filter event=destroy --filter event=die --filter event=kill --filter event=pause --filter event=rename --filter event=restart --filter event=start --filter event=stop --filter event=unpause --filter event=update --filter event=delete --filter event=import --filter event=load --filter event=pull --filter event=save --filter event=tag --filter event=untag --filter event=remove --filter event=prune --format {{json .}}
2023-02-15 11:54:25.124 [debug] docker events --since 1676459065 --until 1676459365 --filter type=container --filter type=image --filter type=network --filter type=volume --filter event=create --filter event=destroy --filter event=die --filter event=kill --filter event=pause --filter event=rename --filter event=restart --filter event=start --filter event=stop --filter event=unpause --filter event=update --filter event=delete --filter event=import --filter event=load --filter event=pull --filter event=save --filter event=tag --filter event=untag --filter event=remove --filter event=prune --format {{json .}}
2023-02-15 11:54:25.201 [error] Failed to set up event listener: spawn docker ENOENT
2023-02-15 11:54:43.161 [debug] docker container ls --all --no-trunc --format {{json .}}
2023-02-15 11:54:45.327 [debug] docker image ls --filter dangling=false --no-trunc --format {{json .}}

@bwateratmsft bwateratmsft reopened this Feb 15, 2023
@bwateratmsft
Copy link
Collaborator

@dschuessler can you try running which docker in a terminal window?

@dschuessler
Copy link
Author

@bwateratmsft

MacBook-Pro:~ $ which docker
/usr/local/bin/docker

From the command line, the docker command works fine.

@bwateratmsft
Copy link
Collaborator

That makes sense. For whatever reason, /usr/local/bin isn't in the PATH environment variable. We've seen problems like this before with MacOS.

As a workaround, can you try setting the VSCode setting docker.dockerPath to /usr/local/bin/docker? It may or may not need quotes around it as well to work, I'm not 100% sure.

@dschuessler
Copy link
Author

The setting works. The extension recognizes Docker now. Thank you!

Let me know if I can help you with any further information.

@bwateratmsft
Copy link
Collaborator

Glad it's working now! I'll resolve this as external to microsoft/vscode#118460, which we've opened to cover these issues with PATH on Mac.

@bwateratmsft bwateratmsft closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2023
@microsoft microsoft locked and limited conversation to collaborators Apr 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants