macOS says Docker.app is damaged or will harm your Mac
Docker.app is damaged and can't be openedShort answer
Two different things hide behind this warning. A drag-and-drop install that was interrupted leaves a half-copied app that Gatekeeper calls damaged. Some older Docker Desktop installs also had wrongly signed helper files that triggered a malware dialog. Reinstall for the first, update Docker Desktop for the second.
Fix it fast
1Find out which cause you have
Read the dialog text and check the Docker Desktop version. 'Damaged' points to the first cause; a malware dialog naming a Docker helper points to the second.
defaults read /Applications/Docker.app/Contents/Info.plist CFBundleShortVersionString2Match what you see, then jump to its fix
- 1
Docker.app is damaged and can't be opened, often right after an install or an update from a DMGA drag-and-drop install was interrupted and left a partial copyFix - 2
A malware dialog names a Docker helper (com.docker.vmnetd or com.docker.socket) and says the action did not harm your MacAn older Docker Desktop install has a wrongly signed helper fileFix
- 1
What does the error look like?
Docker.app is damaged and can't be openedA malware or 'will damage your computer' dialog naming a Docker helper such as com.docker.vmnetdThis action did not harm your Mac.
Cause 1 of 2
A drag-and-drop install was interrupted and left a partial copy
1Check
Copying from a DMG is not atomic. If another program such as an editor or terminal calls the Docker CLI during the copy, the app can end up half copied, and Gatekeeper marks it damaged.
ls -ld /Applications/Docker.app
pgrep -fl docker2Fix
Quit every program that calls Docker (editors, terminals, scripts). Move /Applications/Docker.app to the Trash and empty it. Eject the DMG and mount it again, then reinstall.
mv /Applications/Docker.app ~/.Trash/
# empty the Trash, eject and re-mount the DMG, then drag Docker in again3Verify
Docker Desktop opens and the CLI answers.
open -a Docker
docker versionConfirmed by docs.docker.com
Cause 2 of 2
An older Docker Desktop install has a wrongly signed helper file
1Check
Docker's own statement is that these warnings are inaccurate and Docker Desktop is not affected by malware; some files in existing installations were incorrectly signed. Patch releases exist for 4.32 to 4.37, and the fix is in current releases. Compare your version with the latest.
defaults read /Applications/Docker.app/Contents/Info.plist CFBundleShortVersionString
ls -l /Library/PrivilegedHelperTools/ | grep docker2Fix
Update Docker Desktop to the current release (in the app, or with Homebrew if that is how it was installed). Do not disable Gatekeeper.
brew update && brew upgrade --cask docker3Verify
Start Docker Desktop and confirm the dialog no longer appears.
open -a Docker && docker versionConfirmed by github.com
How do I stop it coming back?
- Quit editors, terminals and scripts that call Docker before installing from a DMG, and keep the DMG mounted until the copy finishes.
- In managed environments use the PKG installer instead of drag-and-drop.
- Update Docker Desktop from inside the app instead of copying a new Docker.app over the old one.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Servers
The Mac terminal does not know the docker command
bash: docker: command not found
The shell cannot find a docker binary in any folder on PATH.
3 causes, each with a fixServers
apk cannot find py-pip in an Alpine Docker image
py-pip (no such package):
On current Alpine releases there is no package called py-pip.
2 causes, each with a fixServers
ng serve runs in the container but localhost:4200 does not open
The browser cannot open localhost:4200 although ng serve is running in the container
ng serve listens on localhost by default, which inside a container is the container itself.
3 causes, each with a fixServers
Angular routes return 404 from nginx when you refresh or open a link
The home page loads, but refreshing /some/route shows an nginx 404
Angular routes like /users/42 are not files, so nginx looks for them on disk and returns 404.
3 causes, each with a fixServers
AH00558: Apache in Docker cannot reliably determine its fully qualified domain name
Set the 'ServerName' directive globally to suppress this message
AH00558 is a warning, not a crash.
2 causes, each with a fixServers
Apache in a Docker container logs AH01114 when it proxies to a backend
AH01114: HTTP: failed to make connection to backend: api
Apache's proxy worker could not open a connection to the address in ProxyPass.
5 causes, each with a fix