Skip to content

Docker Desktop cannot start on mac M1 chip #6145

Open

Description

@xingtanzjr
  • [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.

Activity

  1. b-studios commented on Jan 22, 2022

    @b-studios

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

  2. b-studios commented on Jan 22, 2022

    @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

  3. MSLP commented on Jan 22, 2022

    @MSLP

    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.

  4. LeSauvage commented on Jan 23, 2022

    @LeSauvage

    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

  5. MSLP commented on Jan 24, 2022

    @MSLP

    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: docker/roadmap#142 (comment). 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

  6. Gau-thier commented on Jan 25, 2022

    @Gau-thier

    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!

  7. ramblingenzyme commented on Jan 28, 2022

    @ramblingenzyme

    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.

  8. jleren commented on Jan 31, 2022

    @jleren

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

  9. BasilPH commented on Jan 31, 2022

    @BasilPH

    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.

  10. Cyclic commented on Feb 2, 2022

    @Cyclic

    8 is great.

  11. B-0-B-B-Y commented on Mar 16, 2022

    @B-0-B-B-Y

    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...

  12. lwinch2006 commented on Mar 20, 2022

    @lwinch2006

    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.

  13. philsturgeon commented on Mar 23, 2022

    @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
    
  14. philsturgeon commented on Mar 23, 2022

    @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
    
  15. 18 remaining items

  16. robert-wloch-iits commented on Nov 28, 2022

    @robert-wloch-iits

    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 @LeSauvage. I just encountered that issue on my M1 MBP (OS Ventura 13.0.1). Since the M1 has only 8 cores (4 high performance cores and 4 high efficiency cores) I reduced the value from 5 to 4 and Docker works again.

  17. dth138 commented on Jan 5, 2023

    @dth138

    I also had a memory issue - the new M1 macs have less memory than my old machine, and I had allocated 20GB of memory to Docker. That was fine on my 32GB mac, but not on my 16 GB. Thanks for the tip to edit
    ~/Library/Group\ Containers/group.com.docker/settings.json

  18. nicola-pugliese commented on Jan 24, 2023

    @nicola-pugliese

    In my case I removed this folder ~/Library/Group Containers/group.com.docker/ and then reinstalled the latest version of docker (v 4.16.2). So in my case I enabled again VirtioFS and everything worked.

    MacBook Pro M1 - Mac OS 13.2 (22D49)

  19. michael-koeller commented on Feb 8, 2023

    @michael-koeller

    I had the same problem on M2 MBP. I finally got Docker running by downgrading to v4.5.0, then upgrading from within the Docker UI.

  20. drewlustro commented on Feb 10, 2023

    @drewlustro

    :\

  21. bauerjon commented on Mar 14, 2023

    @bauerjon
  22. rom3r4 commented on Apr 10, 2023

    @rom3r4

    In my case Docker Desktop started getting stuck after an upgrade from 10.17.0 to 10.18.0. I am running MacOS Ventura on Apple M1.

    After many tries of the workarounds above, what only I worked was downgrading to 10.17.0. The downloading site is https://docs.docker.com/desktop/release-notes/

  23. olivierodo commented on Apr 10, 2023

    @olivierodo

    Thank you @rom3r4, I just tried and it worked 🚀🚀🚀.

  24. ecyzhi commented on Apr 20, 2023

    @ecyzhi

    I tried everything here and none of it works for me but when I force quit those Docker processes, there was a fatal error shown. After some digging, only this solution worked for me.
    #6565 (comment)

  25. snowe2010 commented on Jun 23, 2023

    @snowe2010

    I spent several hours trying to figure this out and finally did. In the end the solution wasn't blindly copying and pasting things from the internet, it was to dig into the logs myself:

    Per the Docker Docs:

    pred='process matches ".*(ocker|vpnkit).*" || (process in {"taskgated-helper", "launchservicesd", "kernel"} && eventMessage contains[c] "docker")'
    /usr/bin/log stream --style syslog --level=debug --color=always --predicate "$pred"
    

    Then start Docker Desktop and wait for the error message. In my case, the error was:

    docker running vm running vm and dependencies: running vm running virtualization.framework com.docker.virtualization waiting for com.docker.virtualization vm exit status 1

    So I waited to get that error, then I quit Docker Desktop so it wouldn't interfere. I then searched the logs for exit status 1. I found this:

    2023-06-22 22:52:20.822244-0600  localhost com.docker.virtualization[5191]: (CoreFoundation) [com.apple.CFBundle:strings] Bundle: <private>, key: %@ %@, value: %@ %@, table: Error, l
    ocalizationNames: (null), result: %1$@ %2$@
    2023-06-22 22:52:20.822280-0600  localhost com.docker.virtualization[5191]: VM configuration is invalid: Invalid virtual machine configuration. “memorySize” is greater than “maximumAllowedMemorySize”.
    2023-06-22 22:52:20.822440-0600  localhost com.docker.virtualization[5191]: validating configuration &{Configuration:{MemorySize:32212254720 CPUCount:12 BootLoader:{Kernel:/Applicati
    ons/Docker.app/Contents/Resources/linuxkit/kernel CommandLine:page_poison=1 vsyscall=emulate panic=1 nospec_store_bypass_disable noibrs noibpb no_stf_barrier mitigations=off linuxkit
    .unified_cgroup_hierarchy=1 console=hvc0  irqaffinity=0 vpnkit.connect=connect://2/1999 vpnkit.disable=osxfs-data com.docker.VMID=42a6e2a8-3796-4d90-ad34-f040373bc042 Ramdisk:/Applic
    ations/Docker.app/Contents/Resources/linuxkit/initrd.img} Rosetta:{Tag:} SerialPort:{Input:0x14000330010 Output:0x14000330028} EntropyDevice:{} NetworkDevice:0x1400012a540 StorageDev
    ice:0x14000141000 SocketDevice:{} DirectorySharingDevices:[] MemoryBalloonDevice:{} VsockDevice:0x103d871f8 ID:42a6e2a8-3796-4d90-ad34-f040373bc042} Logger:0x1400013c300 MemoryMiB:30
    720 VPNKitBridgeVSockPort:1999 DiagnosticsVSockPort:62374 RequestedMAC: MACAddrFilename:vms/0/macaddr VPNKitEthernet: ConsoleLog:log/vm/console.log ConsoleSocket:vms/<decode: missing
     data>
    2023-06-22 22:52:20.822450-0600  localhost com.docker.virtualization[5191]: [...] 0/console.sock DiagnosticdDirect:diagnosticd.direct.sock VPNKitBridgeFDPassing:vpnkit-bridge-fd.sock
     VirtiofsShares:[] WatchdogEnabled:true UseRosetta:false InstallRosetta:false ReportCrashes:true BalloonListener:0x14000328000}: Invalid virtual machine configuration. “memorySize” i
    s greater than “maximumAllowedMemorySize”.
    2023-06-22 22:52:20.823183-0600  localhost com.docker.backend[5152]: received error from the com.docker.virtualization process
    2023-06-22 22:52:20.823248-0600  localhost com.docker.backend[5152]: VM failed: running VM and dependencies: running VM: running virtualization.framework: com.docker.virtualization:
    waiting for com.docker.virtualization VM: exit status 1
    2023-06-22 22:52:20.823552-0600  localhost com.docker.backend[5152]: switched to docker cli context default
    2023-06-22 22:52:20.823572-0600  localhost com.docker.backend[5152]: running unix engine: running VM: running VM and dependencies: running VM: running virtualization.framework: com.d
    ocker.virtualization: waiting for com.docker.virtualization VM: exit status 1
    

    It actually said it a bit further up in the logs as well.

    2023-06-22 22:52:20.821315-0600  localhost com.docker.virtualization[5191]: Error Domain=VZErrorDomain Code=2 "“memorySize” is greater than “maximumAllowedMemorySize”." UserInfo={NSL
    ocalizedFailure=Invalid virtual machine configuration., NSLocalizedFailureReason=“memorySize” is greater than “maximumAllowedMemorySize”.}
    

    I then edited the ~/Library/Group\ Containers/group.com.docker/settings.json like others have mentioned, but modified the memoryMiB setting (why isn't this named what the logs say?), and then saved.

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

    Finally I restarted Docker and it worked!

    If your error messages are weird I would highly recommend just searching for VM configuration is invalid or Invalid virtual machine configuration which will tell you right away if it's the settings file (I think).

    backstory:

    I actually migrated to this laptop from a much larger intel mac. the m2s are so good you don't need half the memory or cpus for the same tasks and as a result a lot of the apps were intel based. I think that's what caused all of this pain and suffering.

  26. QinisoM commented on Aug 11, 2023

    @QinisoM

    Thanks @sliucw

    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

    The above worked for me on my M1 Max.

  27. submato commented on Oct 2, 2023

    @submato

    why this bug still exist nowadays

  28. rictt commented on Nov 20, 2023

    @rictt

    Version 4.51 still has this problem, and i renew the version to 4.5.0, the problem resolved

  29. nstankov-bg commented on Jan 7, 2025

    @nstankov-bg

    Erm, I just experienced this in 2025? Not sure if I am annoyed or amused.
    The solution was to downgrade docker desktop on an M2.

  30. masterial commented on Mar 15, 2025

    @masterial

    This is an issue for M3. The frontend doesn't work regardless if one installs from the website or homebrew.

    Docker version 28.0.1, build 068a01e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions