forestbear0110
forestbear0110

Reputation: 2291

Cannot launch docker desktop for mac

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.

Upvotes: 228

Views: 258137

Answers (30)

Mosidrum
Mosidrum

Reputation: 121

After reinstalling the latest version, run this command

sudo launchctl remove com.docker.vmnetd

Upvotes: 11

DyedPurple
DyedPurple

Reputation: 136

For me, this problem seems to have appeared following a signing issue in Docker: https://github.com/docker/for-mac/issues/7527 (I restarted my computer to try to fix this problem, and this new issue about Docker containing malware appeared).

Simply reinstalling Docker fixed the problem.

Upvotes: 0

Ehsan Sarshar
Ehsan Sarshar

Reputation: 3211

Try reinstalling using brew

brew install --cask docker

Upvotes: 0

Max.Futerman
Max.Futerman

Reputation: 1142

If you're facing issues with Docker on macOS, running the following command helped resolve it for me:

brew reinstall --cask docker

This command reinstalls the Docker Desktop application via Homebrew. It ensures you have the latest version and resolves any potential issues with the existing installation.

After running the command, you might need to restart your machine or the Docker application for the changes to take effect.

Upvotes: 0

Rumesh Madushanka
Rumesh Madushanka

Reputation: 379

Solution:

Download Docker Desktop from the official website https://docs.docker.com/desktop/setup/install/mac-install/.

Run the installer.

When prompted, select "Override" instead of "Duplicate" to replace the existing installation.

Complete the installation process.

Upvotes: 1

coder618
coder618

Reputation: 1004

Download new version from the Docker website solved the problem. Mac OSX 15.2 (24C101)

Upvotes: 3

Krishna Vedula
Krishna Vedula

Reputation: 1791

What I had to do was find the "Docker Desktop" inside the Contents folder. This is done by right clicking on the "Docker" inside Applications, and selecting show package contents

Show Package contents of Docker

Once inside the Contents folder, navigate to "Docker Desktop" by going to the MacOS Folder.

Docker Desktop inside the Docker

Right click on "Docker Desktop" and create an Alias.

Creating an Alias for Docker Desktop

Once Alias is created, move the Alias to Applications folder. Now you can invoke this alias directly.

enter image description here

Upvotes: 0

0x1af2aec8f957
0x1af2aec8f957

Reputation: 21

@Rustam Gasanov's answer is the correct answer, but the latest version has changed the settings file path, Since I can't continue writing the latest config file path below the comment (not enough reputation points), I will write a new comment to supplement that answer.

This is usually because the value for the Virtual Disk Limit has been exhausted.

Just change the value in the config file and restart it:

du -sh ~/Library/Containers/com.docker.docker // Check how much does docker data currently occupy
cat ~/Library/Group\ Containers/group.com.docker/settings-store.json
{
  ...
  "diskSizeMiB": 51200,
  ...
}

Upvotes: 0

Badr Bellaj
Badr Bellaj

Reputation: 12821

I solved it following this steps :

1- first force stop all docker instances using enter image description here

2- opened docker desktop and went to update enter image description here

then I chose to update and restart

I repeated this process 2 times and it worked and now the error is gone

Upvotes: 3

Jesus Diaz Rivero
Jesus Diaz Rivero

Reputation: 325

Similar to @sepulchre01's answer, but after clicking on Applications > Docker > Show Package Contents I could not find the docker exec file under Contents > MacOS. It seems it was moved under Contents > Resources > bin. Ran the docker exec and everything works as expected.

enter image description here

Upvotes: 0

Siddiqui Noor
Siddiqui Noor

Reputation: 7986

I had the same issue on my Mac. It was working well, suddenly, one day it stops working. I was able to run it again by the following method (IMPORTANT NOTE: This will delete ALL your containers):

  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)

Upvotes: 539

Longtail Eralbrunia
Longtail Eralbrunia

Reputation: 1

I tried brew uninstall docker in my terminal.
Then its gui appears. After that I downloaded docker app on its website and install again, everything works.
I have no idea about what have happened.

Upvotes: 0

Arun S Nair
Arun S Nair

Reputation: 31

Use activity monitor and Force quit all running activities related to docker and then start docker from applications again

Upvotes: 3

Vivek Kaushik
Vivek Kaushik

Reputation: 311

So, basically what worked for me is this -

  1. Uninstall Docker from Applications -> Move to bin.
  2. Rm-rf Check answer above all files whether they are there or not in the first place!
  3. Installation by shell - answer from another SO

Upvotes: 0

Faizan Ahmad
Faizan Ahmad

Reputation: 632

  1. Open Applications, and locate Docker.
  2. Right click and open show package contents.
  3. Open Contents and then MacOS.
  4. Click on Docker Desktop

click on docker desktop icon

Upvotes: 3

davidjmcclelland
davidjmcclelland

Reputation: 440

  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

The only thing I use desktop for is to get the image name, so nuking Docker would not work for me.

Upvotes: 2

kayhanozturk
kayhanozturk

Reputation: 41

You can run that command:

softwareupdate --install-rosetta

to use docker desktop for apple silicon.

Upvotes: 2

George Barlow
George Barlow

Reputation: 175

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.

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

Upvotes: 0

Sunil Kumar
Sunil Kumar

Reputation: 416

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.

Upvotes: -2

chendu
chendu

Reputation: 829

The following worked instead

Mac version : 12.5.1

  1. Delete Docker form Finder > Applications
  2. Restart mac
  3. Install 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 > Applications > Docker ; it opens the window. and also gets into started status

Upvotes: 12

Oliver P
Oliver P

Reputation: 3386

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.

Upvotes: 8

emj365
emj365

Reputation: 2294

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.

Upvotes: 42

Rehan Dominic
Rehan Dominic

Reputation: 783

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.

Upvotes: 75

Pedro Rodrigues
Pedro Rodrigues

Reputation: 707

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!)

Upvotes: 0

W. Bontrager
W. Bontrager

Reputation: 13

Taking inspiration from the accepted answer, I tried a simpler solution that worked for me.

  1. Open Activity Monitor
  2. Search for 'Docker'
  3. Clicked on the process with the Docker logo
  4. Click on the information icon
  5. Click Quit
  6. After a few seconds of clicking Quit, there were no docker processes in Activity Monitor.
  7. Open Docker as usual (I opened Docker from the dock but I imagine any way of opening the docker application should work.)

Upvotes: 1

Rustam Gasanov
Rustam Gasanov

Reputation: 15781

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)

Upvotes: 22

Jack Yu
Jack Yu

Reputation: 41

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.

Upvotes: 4

Ben
Ben

Reputation: 2023

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

Upvotes: 1

jfunk
jfunk

Reputation: 8122

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

Upvotes: 13

zangw
zangw

Reputation: 48366

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

Upvotes: 5

Related Questions