添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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

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.

kravitty, ryanliu-jr, alexanthony813, magicyoda, itommyyang, liamreeves, lAmirshahinxl, and tiendq reacted with thumbs up emoji cohei, alexanthony813, and liamreeves reacted with heart emoji All reactions

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" mconigliaro, mrgambal, dc185334, HasanSmeir, rankinit, dxyz773, samirfragozo, Husky931, kjschulz, BrumGB, and 46 more reacted with thumbs up emoji alexanthony813, oussemos, callumbutteryfd, furk24, hkrnnkw, polooner, xjhee, gollasandeepkumar, RenhaoL, kosarinin, and 14 more reacted with heart emoji All reactions

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!

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

GaeDLLD, will-sh, josh-may, m-eld, RushikeshBhapkar, skoyev, mateuszkocz, RoryH, autubrew, camillaconte, and 47 more reacted with thumbs up emoji WillPeak, westbuidl, yiailake, jahedprince, gulsharan, surbina, chidi-godwin, KatjaPicqer, manzoliric, tiendq, and 3 more reacted with hooray emoji yiailake, faical23, gabrielfreirebraz, gulsharan, surbina, Octobug, chidi-godwin, DarthMikke, manzoliric, sgir, and 3 more reacted with heart emoji asantiago323, faical23, gulsharan, surbina, chidi-godwin, manzoliric, sgir, and vscaperrotta reacted with rocket emoji All reactions

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?

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 System and Click Apply & Restart.

There are now symlinks in /usr/local/bin and ~/.docker/bin has been removed.

ktkennychow, edruder, CelesteM, unboundxtrading, authordottle, CannonLock, sc0Vu, joshuafredrickson, joyjwlee, nusrat-k, and 2 more reacted with thumbs up emoji ktkennychow, authordottle, joyjwlee, and nusrat-k reacted with hooray emoji kavithamadhavaraj, zimdero, vitorpedeo, Dnd-Mafer, farhan787, sayrus13, leonroy, Jeremy26, zflegle3, ktkennychow, and 5 more reacted with heart emoji ktkennychow, CelesteM, authordottle, and joyjwlee reacted with rocket emoji All reactions

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