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

Can not run Docker on Mac M3

Open FCBTruong opened this issue 1 year ago • 24 comments

Description

Hi everyone, currently I am having a problem, Docker couldn't be launched every time I click open it (thought it still running in Activities monitor). I tried to reinstall with many versions but it's still there.

Running

Image As you can see, the Docker is running but not working (no resources using)

Applications (As you see Docker Icon)

Image

Terminal

Image

I expected it would open a dashboard (as before), but now seem it's having a problem causing it cant work properly. Thank you

Reproduce

  1. Install Docker
  2. Open it

Expected behavior

No response

docker version

Client:
 Version:           27.4.0
 API version:       1.47
 Go version:        go1.22.10
 Git commit:        bde2b89
 Built:             Sat Dec  7 10:35:43 2024
 OS/Arch:           darwin/arm64
 Context:           default
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

docker info

Client:
 Version:    27.4.0
 Context:    default
 Debug Mode: false

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info

Diagnostics ID

333838382

Additional Info

No response

FCBTruong avatar Jan 13 '25 08:01 FCBTruong

Hi @FCBTruong, can you download version 4.37.2 (released last week), then upgrade by opening the dmg and drag-and-dropping the Docker icon to the Applications folder?

It will probably ask your password (in order to copy new versions of vmnetd and socket binaries).

jpbriend avatar Jan 13 '25 09:01 jpbriend

I have the same issue even on version 4.37.2. the problem began on Friday. I had to kill the docker process because it used too much ram and my computer lagged. since then yesterday I only managed to turn on docker once.

jankamuda avatar Jan 13 '25 10:01 jankamuda

I also have the same issue on version [4.37.2]

gitanny avatar Jan 13 '25 10:01 gitanny

Same for me with 4.37.2

Image

sarseniy avatar Jan 13 '25 10:01 sarseniy

Have you rebooted the computer after installing latest version?

jpbriend avatar Jan 13 '25 10:01 jpbriend

Have you rebooted the computer after installing latest version?

Yes I did, I installed latest version 4.37.2 (fix malware). I also tried to shut down my mac and restart again but still not working. I think problem may come from some conflict in my mac architecture

FCBTruong avatar Jan 13 '25 10:01 FCBTruong

Have you rebooted the computer after installing latest version?

Reboot somehow helped to me btw, thanks! Maybe it will be better to add notification that it is needed (or maybe I was looking poorly to them if they exist)

sarseniy avatar Jan 13 '25 10:01 sarseniy

Have you rebooted the computer after installing latest version?

Reboot somehow helped to me btw, thanks! Maybe it will be better to add notification that it is needed (or maybe I was looking poorly to them if they exist)

Image Despite multiple attempts to restart my mac, still got the error

FCBTruong avatar Jan 13 '25 10:01 FCBTruong

@FCBTruong can you uninstall using this CLI command (because Desktop does not start on your laptop):

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

and then install using the CLI?

jpbriend avatar Jan 13 '25 10:01 jpbriend

ok, I think it's working. the steps I did

  1. removed docker manually from Applications (move to trash)
  2. in terminal I did brew uninstall docker (strange, but there was something else after manual removal)
  3. installed docker desktop from https://docs.docker.com/desktop/setup/install/mac-install/
  4. reboot (not running docker earlier, just installing)
  5. started docker correctly

my setup

Image

jankamuda avatar Jan 13 '25 10:01 jankamuda

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

When I attempt to /Applications/Docker.app/Contents/MacOS/uninstall I get the following error:

Error: open /Users/<USER>/Library/Group Containers/group.com.docker/settings-store.json: no such file or directory

MarcosNASA avatar Jan 13 '25 11:01 MarcosNASA

Rebooting isn't helping at all...

MarcosNASA avatar Jan 13 '25 11:01 MarcosNASA

the error is not an issue. Have executed the installation via the CLI?

jpbriend avatar Jan 13 '25 11:01 jpbriend

the error is not an issue. Have executed the installation via the CLI?

Docker is still installed after running the uninstall, though... so I'd say it's an issue?

MarcosNASA avatar Jan 13 '25 11:01 MarcosNASA

This worked for me: https://github.com/docker/for-mac/issues/7531#issuecomment-2580595610 Probably this makes the difference:

rm -rf ~/.docker
sudo rm -f /Library/LaunchDaemons/com.docker.socket.plist
sudo rm -f /Library/LaunchDaemons/com.docker.vmnetd.plist
sudo rm -f /Library/PrivilegedHelperTools/com.docker.socket
sudo rm -f /Library/PrivilegedHelperTools/com.docker.vmnetd

vincentduboisdlc avatar Jan 13 '25 11:01 vincentduboisdlc

@FCBTruong can you uninstall using this CLI command (because Desktop does not start on your laptop):

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

and then install using the CLI?

That worked, thank you!

aishize avatar Jan 13 '25 12:01 aishize

This worked for me: #7531 (comment) Probably this makes the difference:

rm -rf ~/.docker
sudo rm -f /Library/LaunchDaemons/com.docker.socket.plist
sudo rm -f /Library/LaunchDaemons/com.docker.vmnetd.plist
sudo rm -f /Library/PrivilegedHelperTools/com.docker.socket
sudo rm -f /Library/PrivilegedHelperTools/com.docker.vmnetd

This made it! Thank you so much.

MarcosNASA avatar Jan 13 '25 15:01 MarcosNASA

https://github.com/docker/for-mac/issues/7527

the recommended fix is not working for me even after reinstalling and following the fix posted above. Running on an M2 macbook.

maxdmayhew avatar Jan 13 '25 17:01 maxdmayhew

I have an Intel chip.

I had the error referenced here: https://github.com/docker/for-mac/issues/7541#issuecomment-2586821514

These steps were insufficient for me on their own in addition to all the other troubleshooting links that have been posted:

rm -rf ~/.docker
sudo rm -f /Library/LaunchDaemons/com.docker.socket.plist
sudo rm -f /Library/LaunchDaemons/com.docker.vmnetd.plist
sudo rm -f /Library/PrivilegedHelperTools/com.docker.socket
sudo rm -f /Library/PrivilegedHelperTools/com.docker.vmnetd

My solution was to hunt down every last file on my machine that might've held Docker configuration and delete it: find / -name "*[Dd]ocker*":

rm -rf /usr/local/bin/docker*
rm -rf /usr/local/bin/com.docker.cli
rm /usr/local/bin/kubectl.docker
rm -rf /Library/Application\ Support/com.docker.docker
rm -rf ~/Library/Application\ Support/Docker\ Desktop
rm -rf ~/Library/Preferences/com.electron.dockerdesktop.plist
rm -rf ~/Library/Preferences/com.docker.docker.plist
rm -rf ~/Library/Application\ Scripts/group.com.docker
rm -rf ~/Library/Group\ Containers/group.com.docker
rm -rf ~/Library/Containers/com.docker.docker
rm -rf ~/Library/Caches/Docker\ Desktop
rm -rf ~/.kube

After this I was able to install 4.37.2 successfully

alyson-smith-collibra avatar Jan 13 '25 19:01 alyson-smith-collibra

I still can run docker. It installs. When I run the docker app I get two processes, but the desktop doesn't load and I can't run docker-compose. I've tried all the things a few times. Please to help.

docker-compose build WARN[0000] The "CUSTOM_JAVA_OPTS" variable is not set. Defaulting to a blank string. WARN[0000] /Users/epreston/work/integrations/lti-launch-service/docker-compose.yaml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

epreston@NOA-M-J9404J1243 lti-launch-service % !ps ps aux | grep -i docker epreston 2825 0.0 0.0 410733312 1488 s000 S+ 2:12PM 0:00.01 grep -i docker epreston 2649 0.0 0.2 412421872 76576 ?? S 2:08PM 0:00.09 /Applications/Docker.app/Contents/MacOS/com.docker.backend run epreston 2641 0.0 0.2 412082992 71392 ?? S 2:08PM 0:00.12 /Applications/Docker.app/Contents/MacOS/com.docker.backend

Apple M3 Pro 36GB RAM Mac OS Sonoma 14.7.2 (23H311)

ewpreston avatar Jan 13 '25 20:01 ewpreston