A long time ago, I noticed this aberration: whenever the world said to docker-compose
, I could just docker compose
, and get on with my life.
But for whatever reason, today (!!!) was the day I chose to get irked by this persistent docker-compose
vs docker compose
confusion and terminal complaints that compose is not a command
, even though I'm compose up
-ing with glee.
Did I have an install snafu way back? Is docker-compose just basically not where it should be, as evidenced by the docker help file complaint?
Invalid Plugins:
compose failed to fetch metadata: fork/exec /usr/local/lib/docker/cli-plugins/docker-compose: no such file or directory
OK so we know from the above that it should really live in
/usr/local/lib/docker/cli-plugins/
.
A quick which docker-compose
yielded... my home directory instead? Lol.. It gets worse. Actually staring into the desired location yielded these symlinks:
lrwxrwxrwx 1 root root 81 Mar 18 00:19 docker-compose -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-compose
lrwxrwxrwx 1 root root 78 Mar 18 00:19 docker-scan -> /mnt/wsl/docker-desktop/cli-tools/usr/local/lib/docker/cli-plugins/docker-scan
OH .
Latent memory unlocked. I'd forgotten that docker desktop was a windows denizen, and it was simply dangling its roots down into WSL2 for my convenience. I'd forgotten this, and nuked the symlinks on sight (in prep for new ones pointing to my home dir)... and now everything was faceplanting. Even vanilla docker refused to oblige me. WOW. OK. Yikes.
I uninstalled everything and re-installed Docker Desktop again, topside, in windows. Got all my /mnt/*
symlinks back again, and then some. It all works! I can docker-compose
without weird complaints! ALL THAT SAID, GET THIS...
Turns out
docker compose
is actually the newer, go-based implementation that linux cli-sters don't see, but which Docker Desktop appsters do. I effectively had a foot in both worlds. Long and short of it is I needn't have bothered and was sort of "right all along". I never liked the hyphenated invocation anyway; I like the newer sub-command invocation.
Welp! Curiosity, thy name is rampant and pointless cat-killing. meowrrr.