for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

Docker Desktop cannot start on mac M1 chip

Open xingtanzjr opened this issue 4 years ago • 46 comments

  • [Yes ] I have tried with the latest version of Docker Desktop
  • [ No] I have tried disabling enabled experimental features
  • [ Yes] I have uploaded Diagnostics
  • Diagnostics ID: 5ACAD9DC-D2E4-4C66-B300-F06D6D30257E/20220121023559

Expected behavior

The docker desktop should start correctly.

Actual behavior

When I install the docker at first, it runs smoothly. And later, I change the CPU resource from 6 core to 10 core, the docker desktop cannot run and it show the message The docker desktop is stopped.

I tried to re-install it and it doesn't work for me. The troubleshoot function is still not working and any operation has no effect.

The docker desktop is repeated from starting to stopped image

Information

  • macOS Version: 12.0.1
  • Intel chip or Apple chip: Apple M1 Pro
  • Docker Desktop Version: 4.4.2

Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check

Steps to reproduce the behavior

  1. Install Docker desktop.
  2. Change the resource CPU from 6 core to 10 core.

xingtanzjr avatar Jan 21 '22 02:01 xingtanzjr

Can confirm, this exact thing happened to me. Even uninstalling and purging all configs doesn't seem to help.

b-studios avatar Jan 22 '22 09:01 b-studios

As a workaround, I figured out that the configs are stored here:

~/Library/Group Containers/group.com.docker/settings.json

Switching back to 6 CPUS via key:

{
...
  "cpus": 6,
...
}

resolved the issue for me temporarily

b-studios avatar Jan 22 '22 10:01 b-studios

Thanks a lot to @b-studios for the workaround, as I had to re-install and wipe Docker Engine twice (btw, simple re-install does not work, you gotta follow advices here + manual sudo su -> cd / && find . -name '*docker*' -or -name '*Docker*' 2>&1 >out and inspecting the files, drove me crazy) before I found this issue

I'n my vain attempts to improve I/O performance for my local environment, I played around with different configurations, and can confirm that changing CPU from 6 to 10 completely breaks Docker for Mac.

It is broken both in 4.3.2 (that my colleague has and experiences less problems) and the latest version as well.

I have MBP 2021 M1 Pro if it matters.

MSLP avatar Jan 22 '22 23:01 MSLP

As a workaround, I figured out that the configs are stored here:

~/Library/Group Containers/group.com.docker/settings.json

Switching back to 6 CPUS via key:

{
...
  "cpus": 6,
...
}

resolved the issue for me temporarily

Thanks, this fixed my issue, I switched to 10 cpu two days ago and been trying to fix it since, could not find the settings and re-installing wouldn't fix

LeSauvage avatar Jan 23 '22 01:01 LeSauvage

By the way, switching to 6 (from the default 4) cores has dramatically worsened my performance. I believe it is related to the issue outlined here: https://github.com/docker/roadmap/issues/142#issuecomment-772732443. I switched back to 1 CPU and my local setup (quite a hefty one) finally worked on par (and in some aspects better) than MBP 2019 with i5 :D

MSLP avatar Jan 24 '22 00:01 MSLP

Thanks! Got the same trouble yesterday, didn't know it was related to the new resources config I set. Worked for me:

  • uninstall with AppCleaner
  • reboot
  • re-install
  • change settings.json to "cpus":8

Hope this will be fixed soon!

Gau-thier avatar Jan 25 '22 14:01 Gau-thier

Had this same issue, I set my cpus to 9, out of 10. Changing it to 6 fixed the loop. Why would this be happening though, very confused.

ramblingenzyme avatar Jan 28 '22 11:01 ramblingenzyme

I have the same issue, changing CPU's started a reboot loop for Docker Desktop

jleren avatar Jan 31 '22 13:01 jleren

I'm having the same issue where the docker engine oscillates between "starting" and "stopped". I am however on an Intel Mac. Changing CPU from 10 to 6 didn't help. The crash loop seems to be triggered by me updating Docker Desktop to 4.4.2 (73305).

Update: Rebooting my Mac fixed the issue.

BasilPH avatar Jan 31 '22 22:01 BasilPH

8 is great.

Cyclic avatar Feb 02 '22 00:02 Cyclic

I have tried all of the suggestions on here, as well as other threads and still cannot get docker desktop to start up, forever stuck on docker engine is starting. Am on an M1 macbook. Have abandoned Docker Desktop as it just doesn't work, I've spent over 3 full work days trying to make it work and in the end installed colima as a workaround...

B-0-B-B-Y avatar Mar 16 '22 14:03 B-0-B-B-Y

Can not start Docker on MacBook Pro 16 with M1 Max chip. "Whale menu" does not appear on top, but some process is running as I see through Activity Monitor. Changing settings in settings.json does not help. This happens right after installation. UI does not appear at all.

lwinch2006 avatar Mar 20 '22 23:03 lwinch2006

This happened to me when I tried to disable gRPc FUSE (related #5240) and after trying every single tip on every issue relating to starting failures, the solution was to obliterate everything, restart, and cross my fingers.

rm -rf ~/Library/Caches/com.docker.docker
rm -rf ~/.docker
rm -rf ~/Library/Group Containers/group.com.docker

philsturgeon avatar Mar 23 '22 13:03 philsturgeon

This happened to me when I tried to disable gRPc FUSE (related #5240) and after trying every single tip on every issue relating to starting failures, the solution was to obliterate everything, restart, and cross my fingers.

rm -rf ~/Library/Caches/com.docker.docker
rm -rf ~/.docker
rm -rf ~/Library/Group Containers/group.com.docker

open --background -a Docker

philsturgeon avatar Mar 23 '22 13:03 philsturgeon

I played with the resource allocation menu yesterday and now I can't get docker to get passed 'Docker Desktop is Starting'..... deleting all the old configs and installing from scratch isnt helping i straight up cant do my job now. thanks docker

Brodan avatar Mar 24 '22 15:03 Brodan

This happened to me when I tried to disable gRPc FUSE (related #5240) and after trying every single tip on every issue relating to starting failures, the solution was to obliterate everything, restart, and cross my fingers.

rm -rf ~/Library/Caches/com.docker.docker
rm -rf ~/.docker
rm -rf ~/Library/Group Containers/group.com.docker

open --background -a Docker

I just ran into this today as well and these instructions are what finally worked for me. Thanks @philsturgeon 👍

geoff-va avatar Mar 24 '22 16:03 geoff-va

same issue! Had to go back to docker 4.5.0, check (enable) gRPc FUSE and install 4.6.1

mbm-michal avatar Mar 24 '22 18:03 mbm-michal

This happened to me when I tried to disable gRPc FUSE (related #5240) and after trying every single tip on every issue relating to starting failures, the solution was to obliterate everything, restart, and cross my fingers.

rm -rf ~/Library/Caches/com.docker.docker
rm -rf ~/.docker
rm -rf ~/Library/Group Containers/group.com.docker

open --background -a Docker

I just ran into this today as well and these instructions are what finally worked for me. Thanks @philsturgeon 👍

This saved my day!

findmyway avatar Mar 31 '22 05:03 findmyway

same issue in fresh install for mac mini M1, downgrade to Docker 4.5.0 from 4.7 fixed the problem.

cristianortiz avatar Apr 10 '22 17:04 cristianortiz

Same issue with 4.8.2 using Big Sur on Intel Mac. Downgrading to 4.5.0 fixed the issue.

mattclegg avatar May 19 '22 09:05 mattclegg

FYI after a long session, the appcleaner way worked for me as well. Probably some leftover, undeletable config got in the way.

nagyadam2092 avatar Jun 01 '22 13:06 nagyadam2092

This happened to me when I tried to disable gRPc FUSE (related #5240) and after trying every single tip on every issue relating to starting failures, the solution was to obliterate everything, restart, and cross my fingers.

rm -rf ~/Library/Caches/com.docker.docker
rm -rf ~/.docker
rm -rf ~/Library/Group Containers/group.com.docker

open --background -a Docker

Running the above, and restarting the PC, works fine.

pplmx avatar Jul 05 '22 02:07 pplmx

Same situation to

Can not start Docker on MacBook Pro 16 with M1 Max chip. "Whale menu" does not appear on top, but some process is running as I see through Activity Monitor. Changing settings in settings.json does not help. This happens right after installation. UI does not appear at all.

With a small difference, UI is loaded but constatly stopping or starting. Also noticed that cpus set to 5 in ~/Library/Group\ Containers/group.com.docker/settings.json

{
...
  "cpus": 5,
...
}

Downgrading to 4.5.0 fixed the issue.

Has no effect neither. Same effect when cleaning cache...


Turns out in my case the culprit was turned on VPN in network settings on mac settings, disabling it solve the endless starting issue.

arthurkulchenko avatar Aug 13 '22 01:08 arthurkulchenko

I fixed, my step: 1. uninstall Docker 2. rm -rf Library/Group\ Containers/group.com.docker rm -rf Library/Containers/com.docker.docker rm -rf Library/Application\ Support/Docker\ Desktop 3. brew install --cask docker

sliucw avatar Sep 06 '22 08:09 sliucw

Having same issue. all steps above (and previous issue tracker where completely uninstall docker and reinstall) did not work. fortunately diagnos button works "0DE2584C-17A4-4359-9A11-365C5C43E538/20220915081442" It worth mentioning that even in troubleshoot mode, I cannot click reset to factory or uninstall button. they all do no reaction.

sanarena avatar Sep 15 '22 08:09 sanarena

Hey guys, I tried all the fixes above and it still didn't work for me. The docker desktop app was starting on what seemed to be an infinite loop.

What did work was the following:

I ran /Applications/Docker.app/Contents/MacOS/Docker from terminal while having docker desktop open, this made the engine start and docker dektop run normally.

Intuitively something was wrong with communication between terminal and docker, permissions? Could be, although upon installation an advanced authorisation was required but for the helper.

I then disabled integrated terminal and a Mac Authorisation request to docker access terminal popped up.

After authorising, closed down docker and restarted it, and everything worked fine without need to run the '/Applications/Docker.app/Contents/MacOS/Docker' command in terminal. Switched back integrated terminal on, closed and reopened and all still working fine.

Sum up:

  • ran '/Applications/Docker.app/Contents/MacOS/Docker' from terminal while docker desktop open.
  • Switched integrated terminal off
  • Authorised docker to terminal
  • Restarted Docker
  • Everything working well

Re switching integrated terminal purely optional from my POV.

Hope this helps anyone!! Cheers!

JPBedran avatar Oct 02 '22 20:10 JPBedran

Hi @JPBedran I got same problem on mac pro M1

ran '/Applications/Docker.app/Contents/MacOS/Docker' from terminal while docker desktop open.
Switched integrated terminal off // <=== mean close terminal ?
Authorised docker to terminal // <== How to authorised docker from terminal ?

Thanks!

natuan62 avatar Oct 06 '22 02:10 natuan62

~/Library/Group Containers/group.com.docker/settings.json

"cpus": 8,

Thanks, I fixed

sato-ryoka avatar Oct 11 '22 04:10 sato-ryoka

Hi @JPBedran I got same problem on mac pro M1

ran '/Applications/Docker.app/Contents/MacOS/Docker' from terminal while docker desktop open.
Switched integrated terminal off // <=== mean close terminal ?
Authorised docker to terminal // <== How to authorised docker from terminal ?

Thanks!

Hey @natuan62
Hope you got it by now, but just saw this. If you didn't, I switched the integrated terminal off in the docker settings and then switched it back on, in those steps the Mac auth to terminal should pop up. Let me know! Cheers!

JPBedran avatar Oct 11 '22 14:10 JPBedran

I experienced an issue similar to this, except Docker Desktop indicated that the engine was running. Turns out, the socket for the docker container was stored in the ~/.docker/run/docker.sock, so I had to symLink it to /var/run/docker.sock to get things working again.

FWIW here are the things I tried before doing ☝🏽

  1. Restarting Docker desktop (doesn't work)
  2. Resetting docker to factory settings (doesn't work)
  3. Clean/Purged data (didn't work)
  4. Many of the solutions from above
  5. Restart the computer
  6. Pray
  7. Contemplate career choices

Honestly, this issue has taken at least a year off my life expectancy, please fix this.

iAmWillShepherd avatar Oct 22 '22 16:10 iAmWillShepherd