nmodin
(Nmodin)
May 31, 2023, 3:11pm
1
From one day to another, I started getting docker: ‘compose’ is not a docker command.
I’m running Docker Desktop and got compose through that.
This is on a Mac M1 running MacOS 13.3.1 and installed using the .dmg at Install Docker Desktop on Mac | Docker Documentation
‘which docker’ points to /usr/local/bin/docker
I re-installed Docker Desktop (put in bin and re-installed the .dmg) and now it reports these versions:
Engine: 24.0.2
Compose: v2.18.1
Credential Helper: v0.7.0
Kubernetes: v1.25.9
Any ideas on what might have happened and more important, any suggestions on how to finding and fixing the problem ?
rimelek
(Ákos Takács)
May 31, 2023, 4:36pm
2
I have seen multiple issues with permissions on macOS recently. We couldn’t find the original reason, but fixing the permissions helped. If you can’t access the docker folders or executable binaries, it won’t work. In your case the problem could have been with the /usr/local/lib/docker/cli-plugins
folder where the docker plugins are like compose.
jchh
(Jchh)
June 5, 2023, 3:28pm
3
I have exactly this and docker compose
does not work for me. No clue why and I am quite frustrated.
I’m on an Intel Mac running MacOS 13.4
rimelek
(Ákos Takács)
June 5, 2023, 5:18pm
4
Have you checked the folder I mentioned in my previous post?
jchh
(Jchh)
June 5, 2023, 5:34pm
5
Hi,
That directory doesn’t exist (for me).
rimelek
(Ákos Takács)
June 5, 2023, 5:47pm
6
Is it possible that something happened during the installation and the files could not be created? Does /usr/local/lib/docker
exist?
jchh
(Jchh)
June 5, 2023, 5:55pm
7
no, /usr/local/lib/docker
does not exist.
/usr/local/bin/docker
exists though with a date time of when I installed ‘Docker for Mac’.
rimelek
(Ákos Takács)
June 5, 2023, 6:19pm
8
It should. And what about $HOME/.docker/cli-plugins
? Can you find that?
jchh
(Jchh)
June 5, 2023, 6:24pm
9
yes, ~/.docker/cli-plugins
exists.
rimelek
(Ákos Takács)
June 5, 2023, 6:31pm
10
Does this command work?
~/.docker/cli-plugins/docker-compose --version
and this?
/Applications/Docker.app/Contents/Resources/cli-plugins/docker-compose --version
If it does and you don’t want to reinstall Docker Desktop after completely deleting every related file, you could copy the targets of the symlinks in the existing cli-plugins folder to the expected path. For example:
sudo mkdir -p /usr/local/lib/docker/cli-plugins
sudo cp /Applications/Docker.app/Contents/Resources/cli-plugins/docker-compose /usr/local/lib/docker/cli-plugins/
then opening a new terminal and trying docker compose command again.
jchh
(Jchh)
June 5, 2023, 6:43pm
11
~/.docker/cli-plugins/docker-compose --version
returns…
zsh: no such file or directory: /Users/jameshenderson/.docker/cli-plugins/docker-compose
/Applications/Docker.app/Contents/Resources/cli-plugins/docker-compose --version
returns…
Docker Compose version v2.18.1
I’ve installed twice, but admittedly, I did not uninstall first.
rimelek
(Ákos Takács)
June 5, 2023, 6:47pm
12
The copy command I suggested in my previous post could still work, but if you can delete Docker Desktop (after backing up everything you don’t want to lose) and install iit again, my video about uninstalling Docker Desktop on Mac helped some people already: Uninstalling Docker Desktop properly on macOS - YouTube
1 Like
jchh
(Jchh)
June 5, 2023, 6:48pm
13
I’ll try that - thanks so much for your help!
jchh
(Jchh)
June 6, 2023, 12:37pm
14
I think the problem may have been from my security software. I uninstalled/re-installed (with the security app ‘off’) and this time everything worked.