exec: "com.docker.cli": executable file not found in $PATH

Updated Answer:

Since VSCode Docker 1.14.0 you can now set the Docker executable path in the settings, which should help in most cases.

VSCode Setting, Docker Path


Old Answer (Option was removed from Docker Desktop):

The Desktop Docker Version 2.4.0.0 is working for me after I did deactivate the feature Enable cloud experience. You can find it under Preferences --> Command Line.

Cloud Experience


If you are still experience the problem, you may try a clean remove and install of Docker and also make sure that Docker is actually running, see other possible solution(s) here.


History of GitHub Issues:

  • https://github.com/docker/for-mac/issues/4956
  • https://github.com/microsoft/vscode-docker/issues/2366
  • https://github.com/microsoft/vscode-docker/issues/2578
  • https://github.com/microsoft/vscode-docker/issues/2894
  • Status (2021-06-22): VSCode Version 1.57.0 seems to have fixed the issue again.

In my case the problem was I had installed and then crudely removed the docker compose cli. This resulted in the above error to start popping up.

I got the compose CLI back using instructions from https://docs.docker.com/cloud/ecs-integration/#install-the-docker-compose-cli-on-linux and running (as root):

curl -L https://raw.githubusercontent.com/docker/compose-cli/main/scripts/install/install_linux.sh | sh

This fixed it for me.

Note: I would not recommend installing docker-compose cli to fix this issue, but to share some insights in case this is applicable to you as well.


You might get the following error message simply because you did not start Docker just yet

exec: "com.docker.cli": executable file not found in $PATH

Tags:

Docker