Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac cannot open docker #7574

Open
littlecabiria opened this issue Feb 1, 2025 · 28 comments
Open

Mac cannot open docker #7574

littlecabiria opened this issue Feb 1, 2025 · 28 comments

Comments

@littlecabiria
Copy link

Description

Hi Team,

I downloaded the latest version of docker which was realised on 30 Jan. However, when I tried to open it, it shows no response. Could you help me please?

IMG_8035.MOV

Best,
Cabiria

Reproduce

NA

Expected behavior

No response

docker version

Client:
 Version:           27.5.1
 API version:       1.47
 Go version:        go1.22.11
 Git commit:        9f9e405
 Built:             Wed Jan 22 13:37:19 2025
 OS/Arch:           darwin/arm64
 Context:           desktop-linux
Cannot connect to the Docker daemon at unix:///Users/cabiria/.docker/run/docker.sock. Is the docker daemon running?

docker info

Client:
 Version:    27.5.1
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.20.1-desktop.2
    Path:     /Users/cabiria/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.32.4-desktop.1
    Path:     /Users/cabiria/.docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.38
    Path:     /Users/cabiria/.docker/cli-plugins/docker-debug
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     /Users/cabiria/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.27
    Path:     /Users/cabiria/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     /Users/cabiria/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.4.0
    Path:     /Users/cabiria/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/cabiria/.docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.16.1
    Path:     /Users/cabiria/.docker/cli-plugins/docker-scout

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

Diagnostics ID

NA

Additional Info

No response

@patrickstar231
Copy link

its same with mine~

@J4m3s00
Copy link

J4m3s00 commented Feb 1, 2025

Same here :(

@azjz92
Copy link

azjz92 commented Feb 2, 2025

same omggg hahahah solidarity w you guys it's always right when you need it! tried reinstalling everything to no avail, it might a be a weird clue, but i noticed that i had some weird pop ups with docker and my macs security recently (cant remember the message tho)

@littlecabiria
Copy link
Author

littlecabiria commented Feb 2, 2025 via email

@patrickstar231
Copy link

i suppose it would be work on Feb 5th~

@patrickstar231
Copy link

I tried another MacBook Pro, with a 1.4G quad-core Intel Core i5 processor, running macOS Ventura 13.1, and it worked fine for installation and use.

@markspengler
Copy link

I have tried everything Google, ChatGPT, and I could possibly think of to remove all existing docker files and processes and restart everything and no matte what I try this issue is still persisting for me upon redownloading docker and trying to open it.

@kookin
Copy link

kookin commented Feb 2, 2025

Same issue here after multiple reinstallations. ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? When I try to download the mac binary it gives messages about Malware.

@peacekurella
Copy link

I am facing the same issue after I reinstalled docker with the latest version from the website.

@Paraphraser
Copy link

Just hit the same problem on Apple M2 Pro model Mac14,9 running Sonoma 14.7.1. I had just let it upgrade everything except 14.7.3 and that "everything" included the Xcode command line tools - which might perhaps be relevant.

I then rebooted. I was intending to let it upgrade to 14.7.3 but I hit the Docker will damage your system - moved to trash. I emptied the trash and went looking for stuff in the login-items panel related to Docker and disabled those. Then I rebooted again and it came up cleanly.

I'm more of a Docker-on-Linux person than on Mac. I think I installed it on the Mac for an experiment but I can't remember when or why so I can't tell you the version. I have no plans to re-install it at this point. It's just weird for macOS to be saying Docker is malware so I thought I'd add my 2¢ to this issue. Is happening. Is ongoing.

@shayansm2
Copy link

I faced this issue after upgrading my macOS to 15.3 (24D60). it was working fine till I upgraded my macos

@lorenrh
Copy link
Member

lorenrh commented Feb 4, 2025

Would you mind grabbing the diagnostics from diagnostics from the terminal, see Diagnose from the terminal?

@taraspos
Copy link

taraspos commented Feb 4, 2025

For me, problem seems to be related to beta Docker VMM. I had it enabled before Mac OS upgrade to 15.3, and after upgrade Docker stopped working. Then "factory reset" fixed it, and it broke again when I tried to enable Docker VMM.

Image

@jeremyhaile
Copy link

jeremyhaile commented Feb 4, 2025

@patrickstar231

i suppose it would be work on Feb 5th~

Why do you say that?

@djs55
Copy link
Contributor

djs55 commented Feb 4, 2025

Thanks for your report! Could you upload some diagnostics and quote the ID here (as suggested above) ? Reproduce the problem and then run

/Applications/Docker.app/Contents/MacOS/com.docker.diagnose gather -upload

If the issue is related to Docker VMM, then try quitting Docker Desktop and editing

~/Library/Group\ Containers/group.com.docker/settings-store.json

change the UseLibkrun setting to false:

"UseLibkrun": false,

(make sure the file remains valid json, in particular the last key = value pair should not have a trailing ,)

@Paraphraser
Copy link

@djs55 in my case - unfortunately - I can't do that. Sorry.

When macOS chucked up the alert saying Docker contained malware, it wanted to move everything to the trash. Even though the alert seemed implausible on its face, I reasoned that my almost-zero-use of Docker Desktop for macOS meant that I wasn't going to be affected by Docker being removed, so I accepted that option and emptied the trash. Now, there's no way of running that command.

@ActivateDZA
Copy link

I

Thanks for your report! Could you upload some diagnostics and quote the ID here (as suggested above) ? Reproduce the problem and then run

/Applications/Docker.app/Contents/MacOS/com.docker.diagnose gather -upload

If the issue is related to Docker VMM, then try quitting Docker Desktop and editing

~/Library/Group\ Containers/group.com.docker/settings-store.json

change the UseLibkrun setting to false:

"UseLibkrun": false,

(make sure the file remains valid json, in particular the last key = value pair should not have a trailing ,)

I downloaded the latest version from the docker website and updated it but it is still showing the Malware Blocked error message. my ID is 46DA19F7-ECF7-4756-B67C-E8975420074B/20250205133352

@djs55
Copy link
Contributor

djs55 commented Feb 5, 2025

@ActivateDZA for the malware blocked error, there must be something old still on your system that needs cleared out. Try running the script here, in particular the removal steps i.e.

#!/bin/bash

# Stop the docker services
echo "Stopping Docker..."
sudo pkill -i docker

# Stop the vmnetd service
echo "Stopping com.docker.vmnetd service..."
sudo launchctl bootout system /Library/LaunchDaemons/com.docker.vmnetd.plist

# Stop the socket service
echo "Stopping com.docker.socket service..."
sudo launchctl bootout system /Library/LaunchDaemons/com.docker.socket.plist

# Remove vmnetd binary
echo "Removing com.docker.vmnetd binary..."
sudo rm -f /Library/PrivilegedHelperTools/com.docker.vmnetd

# Remove socket binary
echo "Removing com.docker.socket binary..."
sudo rm -f /Library/PrivilegedHelperTools/com.docker.socket

@ActivateDZA
Copy link

@ActivateDZA for the malware blocked error, there must be something old still on your system that needs cleared out. Try running the script here, in particular the removal steps i.e.

#!/bin/bash

Stop the docker services

echo "Stopping Docker..."
sudo pkill -i docker

Stop the vmnetd service

echo "Stopping com.docker.vmnetd service..."
sudo launchctl bootout system /Library/LaunchDaemons/com.docker.vmnetd.plist

Stop the socket service

echo "Stopping com.docker.socket service..."
sudo launchctl bootout system /Library/LaunchDaemons/com.docker.socket.plist

Remove vmnetd binary

echo "Removing com.docker.vmnetd binary..."
sudo rm -f /Library/PrivilegedHelperTools/com.docker.vmnetd

Remove socket binary

echo "Removing com.docker.socket binary..."
sudo rm -f /Library/PrivilegedHelperTools/com.docker.socket

Thank you resolved my issue

@patrickstar231
Copy link

@ActivateDZA for the malware blocked error, there must be something old still on your system that needs cleared out. Try running the script here, in particular the removal steps i.e.
#!/bin/bash

Stop the docker services

echo "Stopping Docker..."
sudo pkill -i docker

Stop the vmnetd service

echo "Stopping com.docker.vmnetd service..."
sudo launchctl bootout system /Library/LaunchDaemons/com.docker.vmnetd.plist

Stop the socket service

echo "Stopping com.docker.socket service..."
sudo launchctl bootout system /Library/LaunchDaemons/com.docker.socket.plist

Remove vmnetd binary

echo "Removing com.docker.vmnetd binary..."
sudo rm -f /Library/PrivilegedHelperTools/com.docker.vmnetd

Remove socket binary

echo "Removing com.docker.socket binary..."
sudo rm -f /Library/PrivilegedHelperTools/com.docker.socket

Thank you resolved my issue

Finally, get done
Thx!!

@patrickstar231
Copy link

@patrickstar231

i suppose it would be work on Feb 5th~

Why do you say that?

it was fixed on 5th~

@littlecabiria
Copy link
Author

Would you mind grabbing the diagnostics from diagnostics from the terminal, see Diagnose from the terminal?

@lorenrh @djs55
Here is my ID: 1C830DA5-89E0-4D1D-8503-E2FCF0ED848B/20250206041242

@guunergooner
Copy link

@ActivateDZA for the malware blocked error, there must be something old still on your system that needs cleared out. Try running the script here, in particular the removal steps i.e.

#!/bin/bash

Stop the docker services

echo "Stopping Docker..."
sudo pkill -i docker

Stop the vmnetd service

echo "Stopping com.docker.vmnetd service..."
sudo launchctl bootout system /Library/LaunchDaemons/com.docker.vmnetd.plist

Stop the socket service

echo "Stopping com.docker.socket service..."
sudo launchctl bootout system /Library/LaunchDaemons/com.docker.socket.plist

Remove vmnetd binary

echo "Removing com.docker.vmnetd binary..."
sudo rm -f /Library/PrivilegedHelperTools/com.docker.vmnetd

Remove socket binary

echo "Removing com.docker.socket binary..."
sudo rm -f /Library/PrivilegedHelperTools/com.docker.socket

👍 I will run com.docker.backend directly in the terminal and it will be stuck all the time. The above steps can be fixed.

 $ /Applications/Docker.app/Contents/MacOS/com.docker.backend
[04:18:38.729914000Z][main                  ][W] system telemetry disabled, custom otlp endpoint "https://desktop.observability-stage.docker.com" will be ignored
[04:18:38.731130000Z][main                  ] maximum number of file descriptors is 9223372036854775807
[04:18:38.731264000Z][main                  ] pinging vmnetd

@Paraphraser
Copy link

What's interesting about those steps (removing launch daemons and associated binaries) is that they were not removed from my system when macOS complained about malware and proposed moving Docker to the trash.

The instructions have definitely helped me clean up these left-over artefacts so thanks.

BUT - it seems to me that if macOS did not do that itself when it clobbered the application, it surely logically follows that those artefacts did not contain whatever "malware" was triggering macOS to complain. In other words, the focus might be in the wrong place.

Just a thought ...

@djs55
Copy link
Contributor

djs55 commented Feb 6, 2025

@littlecabiria thanks for the diagnostics. It looks like you have 2 stuck processes:

<USER>           1420   0.0  0.1 411901840   8944   ??  S    Fri10pm   0:40.23 /Applications/Docker.app/Contents/MacOS/com.docker.backend run
<USER>           1363   0.0  0.0 411516640   8016   ??  S    Fri10pm   0:39.83 /Applications/Docker.app/Contents/MacOS/com.docker.backend

Could you kill these (either with Activity Monitor or the Terminal kill -9 1420 and kill -9 1363) and then try restarting Docker?

@littlecabiria
Copy link
Author

@djs55 I tried both but for kill -9 1363, it shows
kill: kill 1363 failed: no such process

I reinstalled again. Then same situation. I have generated ID again: 1C830DA5-89E0-4D1D-8503-E2FCF0ED848B/20250206111934 (uploaded)

@djs55
Copy link
Contributor

djs55 commented Feb 6, 2025

@littlecabiria thanks for the new diagnostics. To be absolutely sure, could you

  1. run the cleanup script mentioned above Mac cannot open docker #7574 (comment)
  2. log out and log back in -- that will kill any unexpected processes

Let me know what happens!

@littlecabiria
Copy link
Author

littlecabiria commented Feb 7, 2025 via email

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

No branches or pull requests