docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.43k stars 117 forks source link

Docker for Mac hangs while starting up. Stuck on "Docker Desktop is Starting" #5113

Open rje0929 opened 3 years ago

rje0929 commented 3 years ago

Expected behavior

Docker starts up

Actual behavior

Docker doesn't start and just hangs with the "Docker Desktop is Starting" message.

Information

Diagnostic logs

Docker for Mac: 10.15.7

Steps to reproduce the behavior

  1. Just double click the Docker app to start. It also does it on restarting.
radj commented 2 years ago

As with @kasabov , upgrading and then deleting ~/Library/Containers/com.docker.docker worked for me. Factory reset was not enough.

This worked for me albeit with a twist: it was ~/Library/Containers/Docker in Finder.

akshanshshrivastava commented 2 years ago

I think there is an issue with docker 4.10 in Apple silicon chip docker desktop. I Uninstalled that and installed 4.7.0 it worked like a charm

dsantiago commented 2 years ago

Had this issues these days, what i did:

And it worked for me...

raphaelsoul commented 2 years ago

In my case, Kubernetes fails to start caused by connection issue and hosts mapping.

try kubectl cluster-info, if you got

Unable to connect to the server: dial tcp: lookup kubernetes.docker.internal on 114.114.114.114:53: no such host

see here https://github.com/kubernetes/kubectl/issues/874#issuecomment-635162212

My solution that works is edit /etc/hosts and add 127.0.0.1 kubernetes.docker.internal. But notice, do not try to edit ~/.kube/config this file will be override every time bootstrapping docker for mac.

image

hscheib commented 2 years ago

I am on macOS 12.5.1 (Monterey) experiencing the same hanging on "Docker Desktop is Starting" issue with version 4.11.1 (latest)

Wanted to share my temporary solution, I successfully got everything started by downgrading to version 4.8.1

I would like to run on latest version but I tried all the other tips in this thread with no luck

edwin-alvarez commented 2 years ago

This issue is also occurring on my macOS Monterey v 12.5.1.. installation goes well but, then Docker shows as (Not Responding).

<> I installed v 4.10.0 and it runs just fine. Note: I didnt try v 4.11x

I hope 4.12 patch is. avaialble soom

liamwye commented 2 years ago

Have been having the same issue for a few days now too. Started randomly after a shutdown, but now every morning when I boot my Macbook for work, I have to kill Docker and restart before I can do anything.

MacOS Monterey, Version 12.5.1 Macbook Pro (2021), M1 Pro, 16GB

Docker Desktop for Mac Version 4.12.0 (85629) Docker Engine Version 20.10.17

dugajean commented 2 years ago

It's hanging for me too on initial start.

public-rant commented 2 years ago

Same things here on a nearly fresh install of macOS and a brew bundle --global with my Brewfile containing a cask "docker"

The only unusual thing I did was a brew install docker followed by brew uninstall docker before running the bundle command.


macOS 12.6 Docker desktop 4.12 Docker engine 20.10.17

shqld commented 2 years ago

https://github.com/docker/for-mac/issues/5113#issuecomment-1019508978

My colleague had faced on the same issue and this still worked! Thanks!

matfianto commented 2 years ago

If you have a firewall enabled try checking again, make sure Docker is on the list of allowed connections. I also had a problem like this on a bigsur mac and it turned out that the root of my problem was because of the firewall 😅

public-rant commented 2 years ago

If you have a firewall enabled try checking again, make sure Docker is on the list of allowed connections. I also had a problem like this on a bigsur mac and it turned out that the root of my problem was because of the firewall 😅

Now that you mention it, I think this might because I had the "kill switch" feature of my VPN enabled....

demeralde commented 2 years ago

@public-rant I have a kill switch enabled for my VPN too, although it seemed to be working with Docker most of the time. So I'm not sure what's going on there.

xiaolinone commented 2 years ago

I deleted ~/Library/containers/com.docker.docker/backend.lock. It seems to be working for me.

florestankorp commented 1 year ago

I deleted ~/Library/containers/com.docker.docker/backend.lock. It seems to be working for me.

On top of that I had to disable the "Kill switch" of my VPN client. Looks like it's working now...fingers crossed!

florestankorp commented 1 year ago

Nope. False alarm. It's still hanging, crashing and definitely not solved...had to uninstall and reinstall AGAIN for the 100th time...no clue what's going on

Docker Desktop 4.13 MacBook Air M1

myugen commented 1 year ago

Same issue here, gets stuck everytime. Uninstalled and reinstalled.

aprilmintacpineda commented 1 year ago

I'm experiencing this when I startup my pc, docker is configured to run on startup but for some reason it takes forever and seems to be stuck on starting.

endangurura commented 1 year ago

Same issue here, stuck on starting. Uninstalled and reinstalled, no success. MacBook Pro M1

smark91 commented 1 year ago

4.14 not working too MacBook Pro M1 Max

Revert to 4.12 works

jstm88 commented 1 year ago

Just encountered the issue on 4.13.1 - Docker suddenly stopped working and refused to restart.

I honestly can't believe this is the "quality" that Docker deems acceptable. As of now I'm eliminating Docker from my toolchain. It's not worth the trouble.

mauroservienti commented 1 year ago

I'm using 4.14.1 on macOS Ventura (13.0.1) and facing this issue. "Reset Docker to factory defaults" doesn't work as a workaround. The only thing that works for a while is rebooting, which is unacceptable.

Is there a way to download previous version bits? On the Docker website the only option seems to be to download only the latest.

yattias commented 1 year ago

Click the docker icon => Troubleshoot => Reset to defaults & clear cache

jstm88 commented 1 year ago

Click the docker icon => Troubleshoot => Reset to defaults & clear cache

This is only a band-aid since the same problem will recur. Plus, any "solution" that deletes data or settings is a massive red flag. Why would I ever trust anything important to Docker considering that?

Frankly, Docker needs to mark their Mac software as "pre-alpha" to establish more reasonable expectations. Claiming that they "support" the Mac is false advertising.

PaleNeutron commented 1 year ago

Nothing but restart OS worked for me.

ArtemChekunov commented 1 year ago

I was trying to apply the new default-address-pools but Docker Desktop start crashing at the start and the Reset Docker to factory defaults didn't help.

So I did:

  1. echo '{}' > ~/.docker/daemon.json
  2. start the Docker Desktop
  3. rm all containers and networks
    docker rm $(docker ps -qa)
    docker network rm $(docker network ls -q)
  4. apply my new config with default-address-pools
henrik242 commented 1 year ago

So I finally managed to solve this by uninstalling Docker Desktop and switch to colima instead.

$ brew install docker docker-compose colima
$ colima start --memory 8 --cpu 4

Voila, docker and docker-compose works just as before, without the annoyance of Docker Desktop!

dschiavu commented 1 year ago

I'm having this issue when clicking on Restart on the Docker icon's context menu - check the screenshot - Docker freezing and all the menu options getting disabled. Rebooting the system usually resolves it. Thought this one might be related to this issue.

Screenshot 2023-02-22 at 19 08 35
oluwaseye commented 1 year ago

I tried few solutions given in the comments above but found no luck. The solution given here worked for me: https://stackoverflow.com/a/44346110/5118708 Details:

Operating System: MacOs Big Sur 11.6 (intel)

Step 1: Quit docker Step 2: Clean everything including images, containers etc. using: (plz take backup if necessary)

sudo rm -f /usr/local/bin/docker
sudo rm -f /usr/local/bin/docker-machine
sudo rm -f /usr/local/bin/docker-compose
sudo rm -f /usr/local/bin/docker-credential-osxkeychain
sudo rm -Rf ~/.docker
sudo rm -Rf $HOME/Library/Containers/com.docker.docker  # here we delete stored images, If you dont want to delete SKIP THIS STEP

Step 3: Install docker via command line using brew install:

brew install --cask docker  (correct command, the one given on SO didn't work for me.)

Step 4: Open Docker. After this my docker was up and running! Screenshot 2022-01-23 at 9 01 56 PM Hope this helps! 🤞

Had the same issue here on macOS 12.1 Intel Chip and this worked for me !

Thanks been stuck for a while on this issue 😓 👍

You are a rock star!!! thanks. This worked for me

bobwurtz commented 1 year ago

@oluwaseye Your reply was very helpful - thank you! I'm using Monterey 12.6 with the Apple chip and I had to add a few steps to what you described.

sudo rm -f /usr/local/bin/docker
sudo rm -f /usr/local/bin/docker-machine
sudo rm -f /usr/local/bin/docker-compose
sudo rm -f /usr/local/bin/docker-credential-osxkeychain
sudo rm -Rf ~/.docker
sudo rm -Rf $HOME/Library/Containers/com.docker.docker  # here we delete stored images, If you dont want to delete SKIP THIS STEP

# I added the steps below, clearing all docker references from /usr/local/bin
sudo rm -f /usr/local/bin/com.docker.cli
sudo rm -f /usr/local/bin/docker-credential-ecr-login
sudo rm -f /usr/local/bin/docker-index               
sudo rm -f /usr/local/bin/kubectl.docker
sudo rm -f /usr/local/bin/vpnkit

Then I downloaded Docker from the website and it started working.

deendin commented 1 year ago

I had this same issue on a Mac M1, I was so patient to follow this steps:

  1. I restarted my machine
  2. Started docker and the error still remains the same
  3. I signed in to docker, and went back to quit my docker
  4. I started it again and docker is back.
bgok commented 1 year ago

I also tried re-installing Docker. During the re-installation, I noticed a release note that says docker won't work when virtual box is installed. After Virtual Box was uninstalled, the project started fine.

hscheib commented 1 year ago

I have been stuck on an old Docker Desktop version (4.8.1) for the past year because every new version hangs when starting for me on my M1 macbook. I noticed I hadn't updated my macOS in a while. I updated to latest macOS 13.4.1 and then updated to latest Docker Desktop 4.21.1 and Docker Desktop started successfully! So my solution seemed to be getting to a latest macOS version

Steellow commented 1 year ago

For me it started working after I downloaded Docker from their official website. Installing with homebrew caused it to stuck

srosato commented 11 months ago

For me, it started working after I purged everything manually... I used ncdu to find where Docker had let a mark (60 GB of containers + VM within my user directory) and purged all and re-installed.

Since my setup is easy to reproduce I did not mind to start fresh again.

nashaad commented 11 months ago

This worked for M1, Ventura (Docker Desktop installation from official site)

  1. Delete/Uninstall Docker Desktop from Applications

  2. Cleanup. These steps are from another discussion

    rm -rf Library/Group\ Containers/group.com.docker
    rm -rf Library/Containers/com.docker.docker
    rm -rf Library/Application\ Support/Docker\ Desktop
  3. Install from official website again

huelsgp27 commented 4 months ago

same issue, reset works but it will happen again

balusarakesh commented 4 months ago

wow!!! 4 years old issue still happening on a paid platform for me the fix is to completely restart my mac

CharanMN7 commented 3 months ago

User on M2, Sonoma 14.5 here.
This happened with me too. Restart was able to fix it. Not sure if it's gonna come back but, I guess another restart will do the job.