Fresh docker install won't start on Mac Book Pro Apple M3 Max
Description
I had Docker on my old Mac Book Pro and got this new one in December of 2023. I transferred all the files from the old one to the new one (and I'm assuming all docker-relates stuff). Now, when I try to install Docker on the new machine, it won't open. Here is the error from the diagnostics:
Please investigate the following 2 issues:
1 : The test: can a VM be started?
Failed with: vm has not started: failed to open init.log: open log/vm/console.log: no such file or directory
The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines.
2 : The test: are the binary symlinks installed?
Failed with: checking binaries in /usr/local/bin: looking for /usr/local/bin/com.docker.cli: lstat /usr/local/bin/com.docker.cli: no such file or directory
checking binaries in $HOME/.docker/bin: unable to find /Users/[user]/.docker/bin: stat /Users/[user]/.docker/bin: no such file or directory
The symlinks to the docker CLI etc are needed for docker commands to work.
Reproduce
I downloaded the Apple chip version of Docker from your website. I dragged it to Applications. I went to Applications to open it. It said, "Verifying...". Then it gave me the dialogue re: This is an application from the internet, do you want to open it? I confirmed. Nothing happened. I tried clicking it again in Applications, and this time, nothing happened at all. I tried restarting my computer multiple times. I tried uninstalling, I tried a new download, I quit the app in Activity Monitor, I deleted all the com.docker related files in my Library/Containers.
Expected behavior
The docker app should open when it's clicked in the Applications folder.
docker version
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Client:
Cloud integration: v1.0.35+desktop.13
Version: 26.1.1
API version: 1.45
Go version: go1.21.9
Git commit: 4cf5afa
Built: Tue Apr 30 11:44:56 2024
OS/Arch: darwin/arm64
Context: default
docker info
Client:
Version: 26.1.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.14.0-desktop.1
Path: /usr/local/lib/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.27.0-desktop.2
Path: /usr/local/lib/docker/cli-plugins/docker-compose
debug: Get a shell into any image or container (Docker Inc.)
Version: 0.0.29
Path: /usr/local/lib/docker/cli-plugins/docker-debug
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.2
Path: /usr/local/lib/docker/cli-plugins/docker-dev
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.23
Path: /usr/local/lib/docker/cli-plugins/docker-extension
feedback: Provide feedback, right in your terminal! (Docker Inc.)
Version: v1.0.4
Path: /usr/local/lib/docker/cli-plugins/docker-feedback
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.1.0
Path: /usr/local/lib/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: /usr/local/lib/docker/cli-plugins/docker-sbom
scout: Docker Scout (Docker Inc.)
Version: v1.8.0
Path: /usr/local/lib/docker/cli-plugins/docker-scout
Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info
Diagnostics ID
710CD907-F0BE-4D51-B800-15C3F189F1D0/20240525220320
Additional Info
No response
@jwicksnin How did you transfer the files to the new machine? Apple Migration Assistant? Also, was your old machine Apple Silicon too?
Looking at your docker info, it appears that your default plugins are located in /usr/local/lib/docker when they are typically installed in $HOME/.docker for Docker Desktop for Mac. Thus, I recommend fully uninstalling and reinstalling Docker Desktop for Mac.
It was via the Apple Migration Assistant. My old machine was Intel (~2015)
Fully uninstalling and reinstalling manually (following this and other sources) didn't help me.
However, what did finally solve this was running the install commands via the CLI using the docs.
Before I did that, I ran a couple of symlink commands.
ln -s /Applications/Docker.app/Contents/Resources/bin/docker /usr/local/bin/docker
sudo ln -s -f /Users/u/.docker/run/docker.sock /var/run/docker.sock
Those didn't work on their own, but maybe they helped once I installed via the CLI?
I don't know why that worked when nothing else would. However, it now seems to be up and running.
Final note: once Docker started to open, I had to install rosetta when prompted in order for it to start the engine, even though my downloaded .dmg was for Apple chip machines
@jwicksnin When I used Apple Migration Assistant to set up my new Apple Silicon machine, I didn't migrate any of the Intel applications. I just wanted all native Apple Silicon apps. At this time, I'm seeing a couple of Intel processes but these are from Apple's frameworks and one of them is associated with Rosetta 2:
CarbonComponentScannerXPC
WardaSynthesizer_x86_64
If you're being prompted to install Rosetta 2, then your Docker Desktop for Mac isn't installed correctly because I have been using the native Apple Silicon for 2+ years.
Finally, if you have to set up symlinks to get things working, then that should be a red flag for you because Docker Desktop for Mac installation just works. I recommend checking the following guide:
https://docs.docker.com/desktop/uninstall
Note: You'll probably have to do more work to uninstall because you don't have a traditional installation here. There are many ways you can install Docker Desktop for Mac but there are only two ways and one of them is wrong.
I got this working with an older version of the Docker Desktop, 4.260.0, which I downloaded from https://docs.docker.com/desktop/release-notes/#4260
I also am working on a system with an M3 CPU.