4. Run Install Image on Container

01 - problem

I guess my sym link for the docker desktop app with it's link nested in local was wrong

When I look in the docker directory in /usr/local/bin/docker
with,

ls -l /usr/local/bin/docker 

I got

lrwxr-xr-x@ 1 root admin 153 Sep 7 07:49 /usr/local/bin/docker ->
/private/var/folders/0n/6x9nyw2j7nzc7qhcp_rp_nfh0000gn/T/AppTranslocation/3F4B9AB1-7878-4472-8A27-9064923E4940/d/Docker.app/Contents/Resources/bin/docker/private/var/folders/0n/6x9nyw2j7nzc7qhcp_rp_nfh0000gn/T/AppTranslocation/3F4B9AB1-7878-4472-8A27-9064923E4940/d/Docker.app/Contents/Resources/bin/docker
                                                

Where you can see that is a sym link notated with l at beggining, and the path /private/var/folders/0n/6x9nyw2j7nzc7qhcp_rp_nfh0000gn/T/AppTranslocation/3F4B9AB1-7878-4472-8A27-9064923E4940/d/Docker.app/Contents/Resources/bin/docker is linked to the wront docker app,

lrwxr-xr-x@ 1 root admin 153 Sep 7 07:49 /usr/local/bin/docker ->/private/var/folder 
/private/var/folders/0n/6x9nyw2j7nzc7qhcp_rp_nfh0000gn/T/AppTranslocation/3F4B9AB1-7878-4472-8A27-9064923E4940/d/Docker.app/Contents/Resources/bin/docker

02 Solution

🔧 3. The fix

You need /usr/local/bin/docker to point to the real binary inside your installed Docker Desktop app, not the translocated one.

1Remove the bad symlink:
sudo rm /usr/local/bin/docker
2. Create a new one pointing to the real Docker CLI inside Applications:
sudo ln -s /Applications/Docker.app/Contents/Resources/bin/docker /usr/local/bin/docker

Test it:

docker

or

docker --version