Hi!
I'm using VScode for mac.
"Build image" worked for me with version 1.3.0. After updating to version 1.6.0, building image with a working Dockerfile fails with following error: "exec: "com.docker.cli": executable file not found in $PATH".
Restarting VScode & reboot computer didn't work.
Environment: I'm using latest version of Docker, VScode, MacOS Catalina.
My workaround: downgrade version to 1.3.0
Could you please look into this and fix this in latest version?
Did you open VSCode from Spotlight (⌘ + Space)? It could be the same as #2254. There is a bug in OSX where much of the PATH variable is not filled in for apps launched from Spotlight.
I can report the same problem, using macOS Catalina (10.15.7), Docker Plugin 1.6.0, zsh terminal.
Does not matter if launched from terminal, application folder, spotlight (or alfred).
Cheers
Hannes
@HannesOberreiter Does Docker still work if you use the terminal built-in to VSCode, or does it get the same error?
Seems like there could be more than one issue with PATH on OSX. It's not appropriate for the Docker extension to try manipulating the PATH variable so there's not really anything the extension can do. We should try to discover what the underlying problem is preventing it from being completely filled out.
@bwateratmsft you mean the integrated terminal? Yes, Docker is working inside.

Thanks! It looks like this user is hitting the same issue: https://stackoverflow.com/questions/64120020/exec-com-docker-cli-executable-file-not-found-in-path
Under the hood, our build / run / etc. tasks would be doing zsh -c <the command>, same as what that user is seeing. They said downgrading from 2.3.0.5 to 2.3.0.4 fixed it; in a linked issue it's also mentioned that upgrading to 2.4.0.0 fixed it.
Can you or @wanfengkai try upgrading to Docker Desktop 2.4.0.* and see if the issue goes away?
@bwateratmsft thanks for the research. I did not downgrade and upgrade but followed the advice from @mat007 in the linked issue, to deactivate "Enable cloud experience".
Without this feature it is working again.

Cheers
Hannes
@gtardif Any ideas? Might have something to do with new CLI, if disabling cloud experience fixed the issue.
I hit this issue on Docker Desktop 2.3.0.5 today and upgrading to 2.4.0.0 resolved it
I hit this issue on Docker Desktop 2.4.0.0 today and disabling the "cloud experience" for command line in preferences fixed it.
I opened https://github.com/docker/compose-cli/issues/754 to track this.
Most helpful comment
@bwateratmsft thanks for the research. I did not downgrade and upgrade but followed the advice from @mat007 in the linked issue, to deactivate "Enable cloud experience".
Without this feature it is working again.
Cheers
Hannes