Docker not found when freshly installed on Mac
I downloaded Docker Desktop image for Mac. Opened the file and installed this app (drag n drop to the right). Now I started Docker Desktop. Inside it I click "set up and start simple example", it cloned some example git repo and then it failed with "docker command not found".
Am I missing something? Google suggested to add Docker Desktop application to PATH. This is not mentioned in docker desktop installation guide. Where should I add this PATH? I can add to my .zshrc, after that I am able to see docker command in console, but dosker desktop does not read my .zshrc and it still cannot find docker command.
@wibotwi Maybe this ? https://docs.docker.com/desktop/mac/permission-requirements/#installing-symlinks
I also encountered the same issue and resolved it with the following command.
ln -s /Applications/Docker.app/Contents/Resources/bin/docker /usr/local/bin/docker
sudo ln -s -f /Users/u/.docker/run/docker.sock /var/run/docker.sock
and change ~/.docker/config.json
{
"auths": {},
- "credsStore": "desktop",
+ "credStore": "desktop",
"currentContext": "desktop-linux"
}
I did "chmod 755 /usr/locl/bin" and reinstalled docker desktop. No changes. I rebooted macbook. No changes.
Then I linked docker from my local Applications dir into /usr/local/bin/docker
Now it started complaining about different binary not found. So I went into Applications dir and linked all files into /usr/locl/bin.
And voila! Docker Desktop now works fine!
P.S. I did not change credsStore to credStore in config.json. It still works. I am not sure why I need that.
Try this?
Docker Desktop -> Settings -> Advanced -> Choose System, not User -> Click [Apply & restart]
inspired by /docker/for-mac/issues/6793#issuecomment-1498510601
Also have installed Docker Desktop 4.19 and no docker cli tool symlinks are present in /usr/local/bin or ~/.docker/bin
I have Advanced -> System checked:
In the logs I see:
2023-05-13 14:15:25.730544+1000 localhost com.docker.backend[72966]: symlinking CLI plugins
2023-05-13 14:15:25.732404+1000 localhost com.docker.backend[72966]: plugin docker-buildx is already installed
2023-05-13 14:15:25.735290+1000 localhost com.docker.backend[72966]: (CoreFoundation) [com.apple.defaults:User Defaults] found no value for key Proxies in CFPrefsSearchListSource<0x600000898200> (Domain: com.apple.SystemConfiguration, Container: (null))
2023-05-13 14:15:25.732518+1000 localhost com.docker.backend[72966]: updating vpnkit forwards with [{"protocol":"tcp","dst_prefix":"192.168.65.128/32","dst_port":3128,"path":"networkproxy.sock"}]
2023-05-13 14:15:25.794894+1000 localhost com.docker.backend[72966]: plugin docker-compose is already installed
2023-05-13 14:15:25.796183+1000 localhost com.docker.backend[72966]: plugin docker-dev is already installed
2023-05-13 14:15:25.796402+1000 localhost com.docker.backend[72966]: plugin docker-extension is already installed
2023-05-13 14:15:25.796610+1000 localhost com.docker.backend[72966]: plugin docker-init is already installed
2023-05-13 14:15:25.796807+1000 localhost com.docker.backend[72966]: plugin docker-sbom is already installed
Perms:
❯ ls -ald /usr/local/bin
drwxr-xr-x 16 tekumara wheel 512 12 May 15:26 /usr/local/bin
FYI - I installed Docker Desktop on a machine that previously had docker desktop installed. On first open, I was not presented with this Finish setting up Docker Desktop dialog:
Maybe that has something to do with it?
To install the docker CLI symlinks into /usr/local/bin I did the following:
-
Navigate to
Settings -> Advanced -
Check
UserandClick Apply & Restart -
When osascript asks:
Docker Desktop requires privileged access to apply configuration
press Touch ID or enter your password.
-
You'll see a "Background Items Added" notification with
Software from "Docker Inc" added items that can run in the background. You can manage this in Login Items Settings.
There are now symlinks for the CLI tools in ~/.docker/bin
-
Check
SystemandClick Apply & Restart.There are now symlinks in /usr/local/bin and ~/.docker/bin has been removed.
I also had an older version installed already and didn't see the "Finish setting up page"
@tekumara's solution did the trick to me.
Set it to User, Apply & Restart, Set it to System, Apply & Restart.
Additionaly, I had to check Enable default Docker socket (Requires password) for the applications to start working.
Try this?
Docker Desktop -> Settings -> Advanced -> Choose System, not User -> Click [Apply & restart]
inspired by /docker/for-mac/issues/6793#issuecomment-1498510601
This worked for me...
I also had an older version installed already and didn't see the "Finish setting up page"
@tekumara's solution did the trick to me. Set it to User, Apply & Restart, Set it to System, Apply & Restart. Additionaly, I had to check
Enable default Docker socket (Requires password)for the applications to start working.
this solution work for me, tz.
Try this?
Docker Desktop -> Settings -> Advanced -> Choose System, not User -> Click [Apply & restart]
inspired by /docker/for-mac/issues/6793#issuecomment-1498510601
This also worked for me!!
thank you
i get the error of command not found: docker in my mac after installing the Docker desktop i follow these steps https://docs.docker.com/desktop/install/mac-install/
After running this command
sudo ln -s /Applications/Docker.app/Contents/Resources/bin/docker /usr/local/bin/docker error was resolved
I also had an older version installed already and didn't see the "Finish setting up page"
@tekumara's solution did the trick to me. Set it to User, Apply & Restart, Set it to System, Apply & Restart. Additionaly, I had to check
Enable default Docker socket (Requires password)for the applications to start working.
This also works for me. Quite weird that we need to do this. It seems docker will have problems every time if you just reinstall it on a mac.
I was able to resolve this by clicking the troubleshoot icon (?) and then selecting "Uninstall". Then navigate to docker.com, login, and select "Launch Docker Desktop". It immediately brought up the "Finish setting up page" and resolved the problem.