On new installations the command is docker compose without the - now. This has been changed by Docker quite a while back. You can have a look to Docker docs.
Thank You @StephanStS and @Joulinar . And I am sorry I should have completely read an earlier thread on this forum where youβve already mentioned about the docker compose command without the hyphen.
Iβm running DietPi v9.1.1 and have had a different experience, though Iβm not really sure why.
I attempted what OP described, installing docker, docker-compose, and portainer from dietpi-software. The docker compose version command didnβt work, said something along the lines of βcompose is not a valid docker commandβ.
I did some digging, ran sudo apt search docker, found a package called βdocker-compose-pluginβ so I installed that and now docker compose version works!
This is exactly what we install if you select software ID 134
DietPi-Software
βββββββββββββββββββββββββββββββββββββββββββββββββββββ
Step: Installing Docker Compose: Manage multi-container Docker applications
[ INFO ] DietPi-Software | APT install docker-compose-plugin, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
docker-compose-plugin
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.1 MB of archives.
After this operation, 61.6 MB of additional disk space will be used.
Get:1 https://download.docker.com/linux/debian bookworm/stable amd64 docker-compose-plugin amd64 2.24.6-1~debian.12~bookworm [12.1 MB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 12.1 MB in 1s (19.0 MB/s)
Selecting previously unselected package docker-compose-plugin.
(Reading database ... 22884 files and directories currently installed.)
Preparing to unpack .../docker-compose-plugin_2.24.6-1~debian.12~bookworm_amd64.deb ...
Unpacking docker-compose-plugin (2.24.6-1~debian.12~bookworm) ...
Setting up docker-compose-plugin (2.24.6-1~debian.12~bookworm) ...
[ OK ] DietPi-Software | APT install docker-compose-plugin
root@DietPi:~# docker compose version
Docker Compose version v2.24.6
root@DietPi:~#
Hmm, yes I see. I was able to replicate your result on one of my boxes. Will need to check again on the box that was not working. Sounds like I was doing something wrong