I got this crazy error “Docker app will damage your computer you should move it to the Trash” the other day. I didn’t use Docker for a couple of months on my Macbook pro M1 running Sonoma 14.7. No changes were made, I just did not use Docker for a while. I did NOT apply any updates also for a while.

Yesterday, I decided to take on a pending personal project and WTF! The above error pop up when trying to open Docker. Also, I got the below error as well.

I decided to remove Docker and try to install it again. I got the below error:

Then, I decided to update to macOS 14.7.2 and reboot.

I also removed the below docker files:

sudo rm  /usr/local/bin/*{docker,kubectl,hub-tool}*

I ran the Docker.dmg installer again and it successfully installed. The new problem is that my Terminal doesn’t know docker is installed. See what I get when trying to run it:

yofoo:~ rgm$ docker
-bash: docker: command not found

I decided to brew a cup of my favorite caturra variety coffee and taking a break. After a moment I found out I needed to add docker in my PATH manually. Why?? Anyways, I’m still using bash and this is how you add docker to your PATH.

Open .bash_profile file using your favorite editor. I use vim. Enter the below line:

# Add Docker Desktop for Mac (docker)
export PATH="$PATH:/Applications/Docker.app/Contents/Resources/bin/"

Save it and restart your Terminal. Now, you should be able to run docker commands.

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:           desktop-linux
Server: Docker Desktop 4.37.2 (179585)
 Engine:
  Version:          27.4.0
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.22.10
  Git commit:       92a8393
  Built:            Sat Dec  7 10:38:33 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.21
  GitCommit:        472731909fa34bd7bc9c087e4c27943f9835f111
 runc:
  Version:          1.1.13
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Contact me if you have any questions.

Leave a comment

Your email address will not be published. Required fields are marked *