137

I installed docker desktop for mac for the first time, but i couldn’t launch it. I installed it as follows.

・signed up with this official page(https://www.docker.com/get-started) and clicked download button for Mac intel chip.

・opened Docker.dmg file and dragged and dropped Docker.app into Applications.

・did a spotlight search for docker and launched it.

・clicked on the “open” button on the notification screen that says “Docker.app” is an app downloaded from the Internet. Are you sure you want to open it?

No response from the application after this.

Current state

There is a docker app in Applications folder, and Docker in locations(with an eject button). I cannot launch the app, and use any docker commands. The other apps work fine and comfortably.

I tried restart my pc, turn off Firewall and FireVault, and installed again, but the exact same thing happened.

I'm on a MacBook Pro 16 (2019) with the latest version of macOS Big Sur 11.6.

forestbear0110
  • 1,381
  • 2
  • 3
  • 3
  • 1
    Did you also allow docker via `Security & Privacy -> General`. You need to unlock first by pressing the lock in the lower left corner to allow apps. – 0xdnL Oct 13 '21 at 09:07
  • I cannot find docker via Security & Privacy -> General. I think Security & Privacy -> General only allows you to set a password and whether to allow apps to be downloaded only from the app store or also from an identified developer. – forestbear0110 Oct 14 '21 at 01:56
  • Try starting the docker-for-mac via spotlight. When the popup `Are you sure you want to open it?` appears don't press ok, but open `Security&Privacy`, then the tab `General`, unlock, and you should see something in the lower half. See also step 4 at [adamtheautomator.com/docker-for-mac](https://adamtheautomator.com/docker-for-mac/) – 0xdnL Oct 14 '21 at 11:43
  • Thank you for the very clear web page. However, I tried following your advice (as stated on the page), I can't find the corresponding entry in security & privacy. – forestbear0110 Oct 18 '21 at 12:39
  • [this is the solution](https://stackoverflow.com/questions/69552636/cannot-launch-docker-desktop-for-mac#answer-73545528) – WEBjuju Sep 26 '22 at 19:13

18 Answers18

384

I had the same issue on my Mac. It was working well, suddenly, one day it stops working. After searching a lot, I was able to run it again by the following method:

  1. Go to finder and open Applications > Utilities > Activity Monitor.app

  2. Find Docker or Docker Desktop (it was in Not responding mode in my case) and Force Kill the app.

  3. Run the following command in Terminal:

    sudo rm -rf ~/Library/Containers/com.docker.*

  4. Open the setting file in the terminal:

    sudo nano ~/Library/Group\ Containers/group.com.docker/settings.json

then find "filesharingDirectories":

  1. Remove all entries inside this key and leave it as "filesharingDirectories": [], save and close the file.
  2. Finally go to the Application folder, find Docker and run it (wait sometime, it takes a minute or so to run)
  3. It will run and work like a charm!
starball
  • 20,030
  • 7
  • 43
  • 238
Siddiqui Noor
  • 5,575
  • 5
  • 25
  • 41
  • 2
    I did this and purged cache / reset to factory defaults etc using Docker Troubleshoot – The Onin May 16 '22 at 20:44
  • 38
    Worked, thank you very much. Note for others: this will delete ALL your containers – Maxxer Jun 01 '22 at 08:23
  • 8
    I went to Activity Log, found it, double-clicked on it, and then chose [Quit Process] from the menu that pops up. Then I restarted Docker Desktop and it opened correctly. – Kmeixner Jun 22 '22 at 14:37
  • 18
    Simply force-quitting docker from the activity monitor works, there's no need to delete anything else. Steps: 1. CMD + Space, 2. search for the activity monitor 3. while in activity monitor, use the search feature to look for "docker" 4. force-quit all docker activities 5. launch docker – Emmanuel Ndukwe Jun 29 '22 at 10:25
  • 4
    @EmmanuelNdukwe in my case that was not working, maybe you can see the question, that was the first attempt to start docker desktop, so "filesharingDirectories" was the main reason for that, you can search about that. – Siddiqui Noor Jun 29 '22 at 13:07
  • thank you ! I just had to force quit Docker, and I can now access again the docker desktop dashboard – Colin Bernet Jul 04 '22 at 10:42
  • An additional step that I had to go through to get this working was to delete the "httpProxyOverride" and "httpsProxyOverride" settings from ~/Library/Group\ Containers/group.com.docker/settings.json as this was resulting in connectivity failure whether or not I was logged into the corporate network. – PoolOfPeas Jul 28 '22 at 01:35
  • 1
    steos 1-2 worked like a charm for me, so skipped the rest of the steps. – Sheikh Faisal Miskhat Sep 01 '22 at 12:54
  • I had a volume that no longer existed in ~/Library/Group\ Containers/group.com.docker/settings.json – Jan DB Oct 01 '22 at 10:07
  • @EmmanuelNdukwe I had tried force quitting, restarting, everything and it did not work. Removing the lines from the fileSharingDirectories made the difference for us! – DjangoBlockchain Oct 21 '22 at 22:25
  • None of this works for me. Would appreciate any other ideas. Not the kind of behavior I expect from a purchased app. – EricGreg Oct 24 '22 at 20:40
  • 1
    I uninstalled docker (from Homebrew) and reinstalled using dmg file. Still bad. I cleaned per this answer plus rm -rf $(HOME)/.docker and ~/Library/Group\ Containers/group.com.docker. Finally I have Desktop UI again. – EricGreg Oct 25 '22 at 19:20
  • BE careful. This may remove mounting functionality to files – Eli Front Nov 06 '22 at 05:08
  • 1
    This worked! I tried so many things before this, reinstalling docker, purging data, manually removing files from library, none of that worked. Thank you. – Ludo - Off the record Nov 13 '22 at 13:25
  • 1
    The trick for me was that I had a broken symlink on ~/.docker/config.json. It must just assume it's there and totally hang if it can't open. Not great file handling.. anyways, after `rm ~/.docker/config.json`, it loaded fine. – Ambrose Little Nov 15 '22 at 00:29
  • 1
    Closing docker and step 4. remove filesharingDirectories was enough for me – ViktorMS Dec 22 '22 at 13:53
  • 1
    Thanks it worked. In my case, I only had to kill docker from "Activity Monitor" – elcharitas Jan 02 '23 at 22:16
  • I followed the steps and made docker desktop run again. But all the docker images on the local system are gone. How can I get them back? Some of them are not pushed to any image library. – user2156711 Jan 03 '23 at 02:07
  • I only forced it to close and it's back to work again, thanks – Khaled AbuShqear Jan 11 '23 at 12:41
  • You can also use command + space, which opens up a search prompt, then search "Activity Monitor" to open that instead of using finder – Real.Cryptc Jan 11 '23 at 18:11
  • 1
    This worked for me, thanks! I skipped step 3 which left the existing images intact. Not sure but might have been due to removing a directory that was in the list of shared folders. – penfold Feb 19 '23 at 23:21
  • Worked on MacOS Ventura 13.2.1 (22D68). Step 4&5 is the crucial part, as it seems. – massisenergy Mar 01 '23 at 07:08
  • Thanks I only had to kill docker from "Activity Monitor" and the charm happen – aris Mar 24 '23 at 10:35
  • Anyone tried everything here and on the other answers only to come up empty handed? I'm stuck. I can use DD without issue on another machine with similar specs and same version OS. Even weirder yet I created a new temporary User on the machine I'm having issues with and it works when logged in to that account, but for w/e reason I cannot get it to start using my main account. – drrkmcfrrk Apr 02 '23 at 16:34
  • If this is deleting all the containers then what's the benefit of this solution? I think a better way is to just follow sepulchre01's answer which solved the issue without deleting anything. – patel dhruval Jun 15 '23 at 16:46
  • @pateldhruval Did you run into this problem? Many people like me, after trying everything, when it was not running at all, there was no other way than the above solution. Better let docker tell why this happens, why they are not fixing it. I think everyone should do the same as I sent the request. Please submit a bug request if you have enough time. – Siddiqui Noor Jun 23 '23 at 12:36
95

I just solved this using a similar method to @davidjmcclelland's suggestion:

  1. Right click on Docker in Applications folder
  2. Select Show Package Contents
  3. Click through Contents -> MacOS -> double click on Docker exec file

This started up my whale and opened the Docker app for me

macOS-folder-docker

sepulchre01
  • 1,068
  • 6
  • 6
  • 3
    Worked, was more simple than the highest voted answer, and didn't require any changes to my settings. – darksinge Dec 05 '22 at 22:59
  • 2
    yep ! work for me too... this method open a terminal starting Docker desktop as expected. But in my case i closed the terminal and then open it again through the mac Dock and all work fine now, thank you ! – Irwuin Dec 06 '22 at 14:00
  • This worked for me as well. Once opened, I selected the option to keep it in the dock, and can now start Docker desktop reliably by double-clicking the icon in the Mac dock. – stevehs17 Aug 23 '23 at 21:13
32

What worked for me was opening the activity monitor and searching "docker".

Force quit all activities that are running related to docker.

Retry opening docker.

Should work like a charm.

Rehan Dominic
  • 337
  • 3
  • 2
24
rm -rf Library/Group\ Containers/group.com.docker
rm -rf Library/Containers/com.docker.docker
rm -rf Library/Application\ Support/Docker\ Desktop 

and restarted Docker Desktop. Problem solved.

emj365
  • 2,028
  • 2
  • 19
  • 24
  • 2
    Tried everything else above, this is the only one that actually worked for me. However, it logged me out and then my containers are gone. – aprilmintacpineda Nov 15 '22 at 06:05
7

Docker stopped working for me when I upgraded it. I had a MacOS upgrade pending and I assume the Docker update was for the latest MacOS. I went back to an old Docker download, installed that and Docker is now working again.

Hopefully once MacOS is upgraded the latest Docker will work so welcome comments confirming this is the case.

Oliver P
  • 3,029
  • 2
  • 16
  • 12
3

In my case, the docker desktop icon is lost. After I found this icon through the method by @sepulchre01 answer, the docker desktop could not be shown up after clicking the docker icon. However, the daemon docker seems running well

 0   130     1   0 Fri05PM ??         0:00.13 /Library/PrivilegedHelperTools/com.docker.vmnetd
  501  6892  6891   0 Fri05PM ??         3:35.48 /Applications/Docker.app/Contents/MacOS/com.docker.backend -watchdog -native-api
  501  6893  6892   0 Fri05PM ??         0:07.17 /Applications/Docker.app/Contents/MacOS/com.docker.backend -watchdog -native-api
  501  6899  6892   0 Fri05PM ??         0:39.05 com.docker.vpnkit --ethernet fd:3 --diagnostics fd:4 --pcap fd:5 --vsock-path vms/0/connect --host-names host.docker.internal,docker.for.mac.host.internal,docker.for.mac.localhost --listen-backlog 32 --mtu 1500 --allowed-bind-addresses 0.0.0.0 --http /Users/xxxx/Library/Group Containers/group.com.docker/http_proxy.json --dhcp /Users/xxxx/Library/Group Containers/group.com.docker/dhcp.json --port-max-idle-time 300 --max-connections 2000 --gateway-ip 192.168.65.1 --host-ip 192.168.65.2 --lowest-ip 192.168.65.3 --highest-ip 192.168.65.254 --gc-compact-interval 1800
  501  6901  6892   0 Fri05PM ??         0:10.03 docker serve --address unix:///Users/xxxx/.docker/run/docker-cli-api.sock
  501  6909  6892   0 Fri05PM ??         0:05.09 com.docker.driver.amd64-linux -addr fd:3 -debug -native-api
  501  6910  6892   0 Fri05PM ??         0:06.15 com.docker.extensions -address extension-manager.sock -watchdog
  501  6911  6892   0 Fri05PM ??         0:02.38 com.docker.dev-envs
  501  6920  6909   0 Fri05PM ??         0:02.87 /Applications/Docker.app/Contents/MacOS/com.docker.driver.amd64-linux -addr fd:3 -debug -native-api
  501  6933  6909   0 Fri05PM ??        56:52.24 com.docker.hyperkit -A -u -F vms/0/hyperkit.pid -c 2 -m 5120M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=vpnkit.eth.sock,uuid=0d513cbc-4d03-4545-b23b-805e5d9d31d8 -U a94747d2-6ca0-4242-9d8b-a2ff5c0a142e -s 2:0,virtio-blk,/Users/xxxx/Library/Containers/com.docker.docker/Data/vms/0/data/Docker.raw -s 3,virtio-sock,guest_cid=3,path=vms/0,guest_forwards=1525 -s 4,virtio-rnd -l com1,null,asl,log=vms/0/console-ring -f kexec,/Applications/Docker.app/Contents/Resources/linuxkit/kernel,/Applications/Docker.app/Contents/Resources/linuxkit/initrd.img,earlyprintk=serial page_poison=1 vsyscall=emulate panic=1 nospec_store_bypass_disable noibrs noibpb no_stf_barrier mitigations=off linuxkit.unified_cgroup_hierarchy=1 console=ttyS0 console=ttyS1 tsc=reliable noapic vpnkit.connect=connect://2/1999 vpnkit.disable=osxfs-data
  501 26403     1   0  9:00PM ??         0:01.31 com.docker.vpnkit --ethernet fd:3 --diagnostics fd:4 --pcap fd:5 --vsock-path vms/0/connect --host-names host.docker.internal,docker.for.mac.host.internal,docker.for.mac.localhost --listen-backlog 32 --mtu 1500 --allowed-bind-addresses 0.0.0.0 --http /Users/xxxx/Library/Group Containers/group.com.docker/http_proxy.json --dhcp /Users/xxxx/Library/Group Containers/group.com.docker/dhcp.json --port-max-idle-time 300 --max-connections 2000 --gateway-ip 192.168.65.1 --host-ip 192.168.65.2 --lowest-ip 192.168.65.3 --highest-ip 192.168.65.254 --gc-compact-interval 1800
  501 26405     1   0  9:00PM ??         0:00.51 docker serve --address unix:///Users/xxxx/.docker/run/docker-cli-api.sock
  501 26412     1   0  9:00PM ??         0:00.26 com.docker.dev-envs

Then I try to uninstall the docker and reinstall the latest docker version per this

sudo rm -Rf /Applications/Docker.app
sudo rm -f /usr/local/bin/docker
sudo rm -f /usr/local/bin/docker-machine
sudo rm -f /usr/local/bin/com.docker.cli
sudo rm -f /usr/local/bin/docker-compose
sudo rm -f /usr/local/bin/docker-compose-v1
sudo rm -f /usr/local/bin/docker-credential-desktop
sudo rm -f /usr/local/bin/docker-credential-ecr-login
sudo rm -f /usr/local/bin/docker-credential-osxkeychain
sudo rm -f /usr/local/bin/hub-tool
sudo rm -f /usr/local/bin/hyperkit
sudo rm -f /usr/local/bin/kubectl.docker
sudo rm -f /usr/local/bin/vpnkit
sudo rm -Rf ~/.docker
sudo rm -Rf ~/Library/Containers/com.docker.docker
sudo rm -Rf ~/Library/Application\ Support/Docker\ Desktop
sudo rm -Rf ~/Library/Group\ Containers/group.com.docker
sudo rm -f ~/Library/HTTPStorages/com.docker.docker.binarycookies
sudo rm -f /Library/PrivilegedHelperTools/com.docker.vmnetd
sudo rm -f /Library/LaunchDaemons/com.docker.vmnetd.plist
sudo rm -Rf ~/Library/Logs/Docker\ Desktop
sudo rm -Rf /usr/local/lib/docker
sudo rm -f ~/Library/Preferences/com.docker.docker.plist
sudo rm -Rf ~/Library/Saved\ Application\ State/com.electron.docker-frontend.savedState
sudo rm -f ~/Library/Preferences/com.electron.docker-frontend.plist

The docker works well now.

  • Latest Docker version: Docker Desktop 4.11.1
  • Mac: 12.1 Monterey Inter Core
zangw
  • 43,869
  • 19
  • 177
  • 214
3

None of the above worked for me. The following worked instead

Mac version : 12.5.1

  1. delete Docker form Finder > Applications
  2. restart mac
  3. insttall docker via command line : https://docs.docker.com/desktop/install/mac-install/#install-from-the-command-line
  4. run the below commands
#this gives mac user name
whoami 

sudo chown -R <mac username> /Volumes
sudo chown -R <mac username> /Volumes/Data 

now double click on Finder > Applicaitons > Docker ; it opens the window. and also gets into started status

chendu
  • 684
  • 9
  • 21
  • 1
    This answer worked for me in combination with removing these files: https://stackoverflow.com/a/73300670/1059780 – BBK Jun 11 '23 at 15:50
3

I just re-downloaded the dmg and reinstalled the app, selecting "Replace". Worked fine afterwards.

jfunk
  • 7,176
  • 4
  • 37
  • 38
3

The issue is most likely "no space left on device" for docker.

Previous answers focus on removing all docker data, instead you can allocate more space for docker if you don't want to lose your work:

  1. Stop docker(or docker desktop) with Activity Monitor or kill command
  2. Check how much does docker data currently occupy:
$ du -sh ~/Library/Containers/com.docker.docker
  1. Then check how much is allocated for docker:
$ cat ~/Library/Group\ Containers/group.com.docker/settings.json
{
  ...
  "diskSizeMiB": 51200,
  ...
}

In this case it's 50GiB, increase this value with an editor of your choice and save the file.

  1. Start docker(or docker desktop)
Rustam Gasanov
  • 15,290
  • 8
  • 59
  • 72
2

The top vote answer by Siddiqui Noor worked the first time. But it's not once and for all. Each time I want to open Docker Desktop, I need to perform the same steps, which is unrealistic.

The once-and-for-all answer is:

  1. Right click on Docker in Applications folder
  2. Select "Show Package Contents"
  3. Click through Contents -> MacOS -> right click on Docker Desktop
  4. Select "Make Alias".

The Alias is created inside the same directory. Move the alias to the application folder. Now, you can reliably open Docker Desktop in the application folder or find it in the launch pad.

Jack Yu
  • 21
  • 3
1

1 Right-click Docker in Applications folder

2 Select Show Package Contents

3 Double-click Docker Desktop.app

4 Right-click in Dock and select Options -> Keep In Dock

This worked when I had the same problem. The only thing I use desktop for is to get the image name, so nuking Docker would not work for me.

davidjmcclelland
  • 430
  • 9
  • 20
0

I have tried a few of the other solutions here and, while trying them, I ended up discovered what the problem was (in my case):

I have changed the content of the ~/.docker/daemon.json file to something that was incorrect!

I discovered it by doing @jfunk (redownloaded it and then used "replace".) At that time, when Docker was starting, I got an error saying exactly the problem I was having - pointing me to that file. I fixed it and Docker started smoothly after that (without losing anything I had!)

I hope this ends up helping someone.

Pedro Rodrigues
  • 637
  • 6
  • 16
0

For me, it did not launch from the desktop. I had to open the application from the launchpad.

Ben
  • 1,853
  • 19
  • 20
0

you can run that command:

softwareupdate --install-rosetta

to use docker desktop for apple silicon.

kayhanozturk
  • 11
  • 1
  • 3
0

This might not help anyone, I'm not claiming that I completely understood what I did to resolve it but I found simply doing the following command a few times prompted the GUI to come back. The first sign was I got a popup saying accept licensing or something, the GUI then went back to being hidden, I then force quit all instances of Docker in Activity Monitor and then did the same command again. I think at this point I got a message saying something like docker wasn't running or something, but there is an option to reset Docker to factory settings I did that, same thing no GUI, until I re-run the command a final time and for some reason everything popped up and successfully working again. I understand this isn't too helpful, but I, as many, was nearly pulling my hair out trying to resolve it and this worked for me.

/Applications/Docker.app/Contents/MacOS/Docker --uninstall

George Barlow
  • 155
  • 1
  • 5
0

None of the existing solutions mentioned here worked for me. Then I tried the steps mentioned in this comment on the GitHub issue tracker for Docker on macOS and it worked.

The steps are as follows:

  1. Open a terminal window on your macOS machine.
  2. Run the following cmd.
sudo rm -rf $HOME/.docker/buildx
  1. Restart the docker app.
Sunil Kumar
  • 390
  • 1
  • 7
  • 25
-1

I've tried many ways and can't solve it. So I turned to find logs error.

cd ~/Library/Group\ Containers/group.com.docker

find the DockerAppStderr.txt, 'can't create directory Permission denied'

sudo chmod 777 ~/Library/Application\ Support

after operate, I launch the docker desktop success

kiritoGo
  • 11
  • 2
-1

uninstall docker and restart your mac! reinstall it