Resolving "Malware Blocked" Error on macOS with Docker Desktop

If you're encountering a "malware blocked" error when launching Docker Desktop on macOS, don’t worry—this is not a malware issue. This warning typically stems from Apple’s Gatekeeper security feature, which blocks apps that are not from the App Store or lack verified developer signatures.



In this situation, Docker Desktop is not affected by malware. This warning is due to incorrect file signing in some older or existing installations.


The good news? You can resolve this safely by replacing the misidentified files with correctly signed ones included in the Docker app itself.


Some Docker Desktop installations include system files that are either improperly signed or not recognized by macOS as trusted. Gatekeeper may flag these as suspicious, even though they’re legitimate. If you see the "malware blocked" message, follow the below steps.


1️⃣ Quit Docker Desktop

  • Ensure Docker Desktop is not running.

  • Open Activity Monitor and check for any remaining Docker-related processes. Force quit them if needed.


2️⃣ Replace System Files

Run the following commands in Terminal to replace the incorrectly signed files:


sudo cp /Applications/Docker.app/Contents/Library/LaunchServices/com.docker.vmnetd /Library/PrivilegedHelperTools/ 

sudo cp /Applications/Docker.app/Contents/MacOS/com.docker.socket /Library/PrivilegedHelperTools/


These commands copy the properly signed versions of the files from inside the Docker app bundle to the system location.


3️⃣ Restart Docker Desktop

After running the commands, relaunch Docker Desktop.


⚠️Still Not Working?

If you're still getting the error:

  1. Download a current, supported version of Docker from the official release notes.

  2. Re-run Step 2 above after installing the new version.


Last Resort: Full Reinstall

If the issue persists, do a clean uninstall and reinstall:


Uninstall Docker Desktop:

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

Reinstall:

Download the latest version from the official Docker site and install it as usual.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article