Closed aroc closed 5 months ago
Happened to me as well. I restarted, re-downloaded, and managed to install. But I can't build images now - 4.25.0 seems to be completely borked on M1 macOS Sonoma 14.1
+1 — I'm seeing this also, also opening a ticket with Docker Support and have posted on the Docker Slack #docker-desktop-mac channel —
Here are my specs —
I had, I think, Docker Desktop app for Mac for Apple Silicon v4.24.1, and I tried to update in the Docker Desktop App to the new Docker Desktop app for Mac for Apple Silicon v4.25.0. Whenever I tried to update, it not only deleted my old Docker Desktop app for Mac, but it won't launch the newer Docker Desktop app for Mac for Apple Silicon v4.25.0, as when it is copying over, I get a message from Mac OS saying "Docker.app is damaged and cannot be opened. You should move it to the trash," with two buttons, "Move to Trash" and "Cancel." What makes matters worse, is this dialogue will not go away, no matter how long I hold down the Escape key to do the "Cancel," and will only go away once I've moved the new Docker Desktop app for Mac for Apple Silicon v4.25.0 to the trash. I cannot move it out of the trash, as the moment I try, I immediately get the "Docker.app is damaged and cannot be opened. You should move it to the trash," with the two buttons, "Move to Trash" and "Cancel" again, over and over.
I have tried the following to resolve they and get the newer Docker Desktop app for Mac for Apple Silicon v4.25.0 installed on my MacBook Air, as I need immediately it for my work and development projects —
ls -lahs ~/Library/Containers/com.docker.docker/Data/vms/0/data
and if the Docker.raw
file is there, delete. I did so, and restarted my MacBook air, re-downloaded a new Docker Desktop app for Mac for Apple Silicon v4.25.0 install *.dmg file, and tried copying Docker Desktop app for Mac for Apple Silicon v4.25.0 to my MacBook Air Applications folder, and still get the same result of getting the Mac OS dialogue telling me the Docker.app is damaged and must be moved to the trash.~/Library/Containers/com.docker.docker
and ~/Library/Containers/com.docker.helper
directories completely, as well as searching for and deleting any other com.docker.*
directories or files and any docker-related *.plist
files, restarting the MacBook Air and re-downloading the install dmg files for Docker Desktop app v4.25.0 for Apple Silicon and reinstalling, and I still get the same result of getting the Mac OS dialogue telling me the Docker.app is damaged and must be moved to the trash.Obviously, I'm frustrated and at a loss for what to do here — I cannot be without Docker, my work / projects require I use that and some kubernetes stuff on AWS (AWS ECS Fargate & AWS EKS) so I cannot be without Docker and I have had this problem since last night. If someone could please tell me how I can properly download the latest Docker Desktop app for Mac for Apple Silicon v4.25.0 on my MacBook Air and have it install properly with no errors, I would greatly appreciate it. Thank you in advance.
@faddah If it helps, I fixed mine by downgrading to Docker desktop 4.24.2
Same thing happened to me, Normal auto-update of docker, ☠️
@faddah and I have had some luck re-installing rosetta, before installing docker.
Perhaps there is a hint in the response from installing rosetta:
2023-11-20 09:14:43.214 softwareupdate[2655:6978809] Package Authoring Error: 042-86463: Package reference com.apple.pkg.RosettaUpdateAuto is missing installKBytes attribute
Try:
softwareupdate --install-rosetta
Then re-drag-dropping the app into your Applications from the download dmg.
Seemed to work after that. No idea why.
Hey there @aroc, would you be able to try what @almunnings suggested is working?
Can you also make sure @aroc you have your time system correctly synced? System Settings > Date and Time
I've seen some users having this problem on other apps where the system time didn't match the created time of the signed DMG which can "confuse" gatekeeper
Thank you very much everyone for the investigation, that's really insightful - I am currently investigating how this problem is happening and how it could relate to rosetta 2
Actually, through @almunnings on the Docker Slack in the #docker-desktop-mac channel, i was finally able to get help and get this fixed. What @almunnings did was, from the Mac OS Terminal command line, he did $ softwareupdate --install-rosetta
, and then downloaded the latest Docker Desktop for Mac v4.25.1 for Apple Silicon chip, copied that new version over, and it seemed to work without the dreaded, "'Docker' is damaged and can't be opened. You should move it to the Trash." error. I did the same, and it is now working for me also.
However, I think this ticket needs to remain open, because Rosetta is for emulating / virtualizing Mac OS Apps that were created for Intel chip byte code, not the current Apple Silicon M1, M2 or M3 family chipset. There is no reason, if, as it purports to be, the Docker Desktop for Mac v4.25.1 for Apple Silicon is solely for Apple Silicon Macs, there should be no Rosetta or previous Intel emulation / virtualization needed. But that is the fix. So I think the Docker engineering team needs to really look at this and figure out why their Apple Silicon software download requires Rosetta emulations / virtualization to run properly.
This happened to me also but on Intel Mac, this is the second time in about a year, and seemingly related to updating but not immediately after, usually after a reboot and the login item for Docker tries to start and it's a wrap. Latest Sonoma update, latest Docker Desktop, I've just finished uninstalling and about to reinstall but this requires deleting volumes and essentially losing everything related to Docker.
@almunnings Thanks for sharing this info, this made it work indeed!
I was still getting this after running:
softwareupdate --install-rosetta
So I ended up copying Docker.app out of the .dmg and into my Downloads folder and then manually moving it to my applications directory with:
mv ~/Downloads/Docker.app /Applications/
For whatever reason that seemed to work.
I was able to fix this with some help from a brew install after trying the following:
On a hunch I decided to try reinstalling with brew brew install --cask docker
, which provided me more detailed errors like:
% brew install --cask docker
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-cask/d466e6742ea09040fa9bcecd2d07e1f592020cc0/Casks/d/docker.rb
###################################################################################################################################################################### 100.0%
==> Downloading https://desktop.docker.com/mac/main/arm64/131620/Docker.dmg
###################################################################################################################################################################### 100.0%
==> Installing Cask docker
==> Moving App 'Docker.app' to '/Applications/Docker.app'
==> Backing App 'Docker.app' up to '/opt/homebrew/Caskroom/docker/4.26.1,131620/Docker.app'
==> Removing App '/Applications/Docker.app'
==> Purging files for version 4.26.1,131620 of Cask docker
Error: It seems there is already a Binary at '/usr/local/bin/docker'.
I asked chat what this meant and it responded with:
The error message you're seeing, Error: It seems there is already a Binary at '/usr/local/bin/docker', suggests that a Docker binary already exists on your system, likely from a previous installation. This is preventing Homebrew from completing the installation process. Here's how you can resolve this:
Remove the Existing Docker Binary:
Before proceeding, it’s important to remove the existing Docker binary. Use the following command:
bash
Copy code
sudo rm /usr/local/bin/docker
This command will remove the existing Docker binary. You may need to enter your password.
Reinstall Docker Using Homebrew:
After removing the existing binary, you can try reinstalling Docker with Homebrew. Run the command again:
bash
Copy code
brew install --cask docker
This should now complete without the error.
When I tried to install via brew a second time I received a similar error, so I asked chat again and it said to do the same for the new docker artifact that stuck around...rinse and repeated this until these errors were gone and voila, was able to install and run Docker Desktop again.
Looks like something (likely something watching the Applications folder or on a schedule) is trying to start Docker before the copying is finished... I manually closed the "verifying..." dialog that pops up a few times during the copying process and that seems to do the trick.
I hit this yesterday when I tried to re-run Docker after upgrading from an Intel-based mac. After uninstalling the old Docker application, I needed to do a full system restart before I was able to install the new Apple Chip version.
Hello there, i was the same error, but i you guys can fix with some steps.
It's works for me right now.
Updates from any version to 4.27.1
fixed some problems during the update process including cases where corruptions could happen. We would love your feedback and see if you encounter this issue going forward (to and from 4.27.1
)
Feel free to @ me in this thread if you experience this again!
I had the same issue. I tried installing it binary and it always failed saying that, Docker is damaged and can't be opened
. I then tried to install it with brew. While installing with brew as well, I faced errors but they were related to already existing files required for docker to be installed completely.
So, I deleted those files and tried again and it worked! 🎉
These are the files that I deleted:
- /usr/local/bin/docker
- /usr/local/bin/docker-compose
- /usr/local/bin/docker-credential-desktop
- /usr/local/bin/docker-credential-ecr-login
- /usr/local/bin/docker-credential-osxkeychain
- /usr/local/bin/docker-index
- /usr/local/bin/kubectl.docker
- /usr/local/bin/com.docker.cli
- /usr/local/bin/hub-tool
@reeversedev2 thank you for the feedback, would you be able to indicate me from which version of Docker Desktop you initiated the update and with which version you ended up after the update? I'm glad you were able to unblock yourself 🚀
Thank you for the feedback, I've tried these steps and still have this issue within 30 mins of a fresh install... Here is my environment setup, OS - Sonoma 14.3, Intel cpu. I have tried all the versions below
4.26.0 4.26.1
Steps I took until corruption.
1.) uninstalled docker manually
2.) removed all the listed above files
3.) reinstalled through the DMG from docker.com
4.) waited 30 mins and the error appeared.
Note: other times I get the error immediately after reinstall.
Hey there would you be able to try again with the latest version (4.27.1)? https://docs.docker.com/desktop/release-notes/#4271 most of corruption would be fixed from this version :) let me know how it goes!
@neonima Yep I've been trying on the newest version and was able to get it installed and it worked however, docker-compose is now showing as corrupted..
note the docker compose version I'm using is this one.. [docker-compose-darwin-x86_64] (https://github.com/docker/compose/releases/download/v2.24.5/docker-compose-darwin-x86_64)
@neonima I updated to v4.27.1
from v4.27.0
. However, I think my issue was more of a update not installed properly.
@reeversedev2 Thank you 👍 I am curious to see how the futur updates will work for you after you've cleaned the binaries from the dir!
@KStone18 If I understand you correctly you've installed docker compose outside of the docker.dmg package, and when you did the update from the app, docker compose got corrupted, am I correct? Note: docker-compose gets installed with docker desktop, but if you need to use a specific version, it shouldn't create a corruption on an already installed binary. Would you be able to send me a Diag ID? https://docs.docker.com/desktop/troubleshoot/overview/#diagnose-from-the-terminal Thanks a lot!
I ran into this issue as well just now upgrading to Sonoma 14.3.1, then Docker complained with the message in thread.
Thanks to @brianmriley 's comment it's now resolved.
Steps I took:
Move to Trash
after initial error message.Move to Trash
again.brew install --cask docker
; same error message as Brian saw.- /usr/local/bin/docker
- /usr/local/bin/docker-compose
- /usr/local/bin/docker-credential-desktop
- /usr/local/bin/docker-credential-ecr-login
- /usr/local/bin/docker-credential-osxkeychain
- /usr/local/bin/docker-index
- /usr/local/bin/kubectl.docker
- /usr/local/bin/com.docker.cli
- /usr/local/bin/hub-tool
brew install --cask docker
Same here on Mac with Apple Chip and Sonoma and Docker Version 4.27.2 followed the steps from @brianmriley (the hard way) and succeeded
This happens to me every few months. To fix it I just uninstall docker, restart the Mac, and install it again. Works every time.
@jagobagascon would you be able to send me a diag id?
This just occurred for me in the Docker app on Mac Apple M1 Sonoma 14.3 conducting a recommended update to Docker 4.28.0 (I was up to date with all the updates up to this point). I suppose there are no options to recover anything an a clean install is required?
Update: can continue using Docker after giving permission in system settings -> security preferences.
@neonima sorry for the wait. Here it is: 1A7FB959-8001-49F2-8969-CEB679979E39/20240305163955
.
Thank you very much!
It just happened again. I had a few containers running and had to leave for half an hour. When I got back and woke up the Mac the error was showing:
“Docker.app” is damaged and can’t be opened.
And I'm quite sure that every time this has happened it was the same situation. Mac sleeps with docker running, the error shows on wake up.
Edit: I forgot to mention (and this may be important) that I install Docker using the Mosyle MDM client for business.
I had the same issue. I tried installing it binary and it always failed saying that,
Docker is damaged and can't be opened
. I then tried to install it with brew. While installing with brew as well, I faced errors but they were related to already existing files required for docker to be installed completely.So, I deleted those files and tried again and it worked! 🎉
These are the files that I deleted:
- /usr/local/bin/docker - /usr/local/bin/docker-compose - /usr/local/bin/docker-credential-desktop - /usr/local/bin/docker-credential-ecr-login - /usr/local/bin/docker-credential-osxkeychain - /usr/local/bin/docker-index - /usr/local/bin/kubectl.docker - /usr/local/bin/com.docker.cli - /usr/local/bin/hub-tool
solution worked for me!
I got the same error after updating Docker Desktop. The simple solution that worked for me was: right-click the Docker app in finder (Macintosh HD > Apps> Docker) and choose 'Open' in the dialog.
I am having the same issue now and then (maybe a couple of times per month). I am not sure if each time was related to the mac sleeping. But this time, I was working on my mac, and suddenly got this message. It is not the first time I got this message while working on the mac. Every time, I needed to reinstall Docker.
I just had this issue. Went about debugging it:
Check the logs using the "Console" + filter logs by "docker". Found this issue:
ASP: Security policy would not allow process: 1494, /Applications/Docker.app/Contents/Library/LoginItems/DockerHelper.app/Contents/MacOS/DockerHelper
Went to Security settings for OSX. And found this warning:
So in my understanding, what happens is at some point Docker stops being treated as "Identified developer", then tries to auto-open its helper apps, at which point we get this cryptic message.
At this point I'll try to just reinstall it, but I'm curious as to what caused this issue. Why docker is not identified developer.
Docker being marked as damaged due to symlinks being used at the same time an in-update is happening has been fixed! Please open a new issue if this arises again from 4.30
@elaman Would you be able to open a new issue - this looks different :)
I managed to fix this by doing the following:
brew cleanup docker
sudo rm /usr/local/bin/*{docker,kubectl,hub-tool}*
to do so)Just happened again after update today.
Hey @strogonoff Would you be able to share from which version you did an update or was it a manual update? Thanks :)
@doylio this is now fixed in the latest version with in-app update, however if you update manually, it might still happen
Version 2.42.2 works for me
Just re-downloading it manually from docker website fixed this for me - I'm on 4.32.0 ☝️
my solution was:
first move the Docker app to trash when you see the dialog. Then reopen the .dmg file and drag it to the Applications folder but DON'T open the app.
before opening the Docker.app
when it's added to the Applications folder. Go to System Settings > Privacy & Security > Developer Tools
click the +
icon and Docker.app
from the Applications folder. Now you should be able to open Docker.
This seem to have solved the issue.
I am trying to deploy Docker Desktop 4.32.0 DMG-file via Microsoft Intune to managed Mac-devices and I am also facing reported issues. When Docker Desktop have been installed from Company Portal, users will get this:
After that, users need to manually delete the app so Intune will re-install it again. For some users, that works. For some other users, it does not.
We have also identified this from Gatekeeper, which also prevent some users to open Docker from Launchpad:
Anyone else still facing these issues from latest version? This version is not ready for Intune-deployment due to these problems.
I am using a MacBook Pro M1, and I was experiencing the same issue. However, the method provided by @israrwz worked without any problems.
my solution was:
first move the Docker app to trash when you see the dialog. Then reopen the .dmg file and drag it to the Applications folder but DON'T open the app.
before opening the
Docker.app
when it's added to the Applications folder. Go toSystem Settings > Privacy & Security > Developer Tools
click the+
icon andDocker.app
from the Applications folder. Now you should be able to open Docker.This seem to have solved the issue.
The only thing that worked for me is that I installed Docker Desktop for M1 Silicon Chip once and got the same initial message as OP.
I then redownloaded the installer, ran it again, and told it to replace it. For some reason, that allowed this to work.
Using the latest MacOS Sonoma with an M1 Mac.
Description
About once a week my docker for mac installation throws an error and wants me to delete it. This forces me to have to redownload and install Docker for mac. I get a MacOS alert with the message:
After deleting and re-installing, one of two things happens
Though I'm not 100% sure, this seems to have started as of version 4.24.0, which I installed because I was excited about the new resource saver feature.
This has happened on version 4.24.0, 4.24.1, 4.24.2, and 4.24.5
Reproduce
Expected behavior
I don't expect this to happen at all
docker version
docker info
Diagnostics ID
18F45D69-1E4A-48FF-BF3D-918A69C6C5B0/20231027142839
Additional Info
This is happening to several of my co-workers as well. We're all on Apple Silicon, and coworkers on Intel macs don't seem to experience this issue.