Docker:command not found after installing Docker desktop on Mac

Hi ,
After installing Docker desktop on my Mac ,I am getting “command not found” error whenever I am trying to run any docker command like “docker --version”

I am kind of new to Mac. I tried to check below things:

  1. PATH variable:
    /usr/local/bin /usr/bin /bin /usr/sbin /sbin:/usr/bin:/bin

2.Desktop icon is showing docker is running.

3.ls -l /usr/local/bin/docker gives this output:
lrwxr-xr-x 1 root wheel 54 May 8 15:37 /usr/local/bin/docker → /Applications/Docker.app/Contents/Resources/bin/docker

4./Applications/Docker.app/Contents/Resources/bin has a file called “docker”.

Please help me what I am missing.

Last update:
If I run this:
/Applications/Docker.app/Contents/Resources/bin/docker --version
Then it is giving result.
Docker version 19.03.8, build afacb8b

2 Likes

I had the same issue. I ran Docker Desktop from the Applications folder and it finalized the setup. I was a bit surprised that the installer did not complete the required installation.

2 Likes

THIS!! Thank you. Never in a million years would I have guessed that I actually needed to run Docker desktop to make the symlinks or whatever. ty!

I am having this issue with v20.10.5 Running Desktop Application did not resolve the issue. I did all of the same checks initial user listed above, with the same results.

1 Like

I had same issue, I was able to fix mine by manually adding $HOME/.docker/bin to my PATH variable

1 Like

Interesting, looks like somehow the settings now install docker as USER instead of SYSTEM so the executables are not included in your PATH by default. I recently moved between Macs and was caught offguard by this change.

Updated my PATH as mentioned by Zil0, but will probably just change the radio button to SYSTEM since that makes more sense to me.

Also for what it’s worth the “diagnose” tool gave no hint other than to tell me docker wasn’t in my PATH

9 Likes

Great, I was having the same issue and this solved it for me

Thanks! This was a solution for me

this solution given by Rob is still valid in 2024, I have checked the System Radio button and it worked as a charm, thanks.

1 Like

This did the trick for me also.

After installing the docker desktop app on Mac, the “Advanced” section under the setting “System” was active but I could not run the docker command on the terminal. The fix was to change it to “User” apply and restart then change back to “System” apply and restart before the docker command started working on the terminal

12 Likes

Flipping between also worked for me in 2025. This is even after attempting to manually edit my zshrc and bashrc files.

4 Likes

I found System was selected already but still, it didn’t work. So I switched to User and clicked Apply & restart then again selected the System and clicked Apply & restart. It started to work for me. Thank you.

2 Likes

I tried also the same, flipping between System and User, and it also worked for me. Thanks!!

Thank you for sharing your experience

This is the optimal solution. No need to manually change the path.

  • Following command works
export PATH="$PATH:/Applications/Docker.app/Contents/Resources/bin/"

Tried the export PATH="$PATH:$HOME/.docker/bin" but failed

Post above try, I was able to run docker from my Mac.

2 Likes

This worked for me;

echo 'export PATH="/Applications/Docker.app/Contents/Resources/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

After which I restarted the docker application and I was able to run docker commands from the terminal.

Your Docker install is fine — the problem is your PATH is broken because some folders are mashed together without proper spaces or others. That’s why the system can’t find the docker command. Fixing your PATH should solve it!

Thank you! This still works

1 Like