cannot launch docker desktop for mac

Viewed 23535

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.

8 Answers

I had the same issue in my Mac. In my case 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!

Hope this helps me and others in the future.

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

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.

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.

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.

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

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

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

Related