Docker-compose Command not found

Creating a bug report/issue

Required Information

  • DietPi version :
    G_DIETPI_VERSION_CORE=9 G_DIETPI_VERSION_SUB=0 G_DIETPI_VERSION_RC=2 G_GITBRANCH='master' G_GITOWNER='MichaIng'

  • Distro version | bookworm 0

  • Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

  • Architecture | arm64

  • SBC model | RPi Zero 2 W (aarch64)

  • Power supply used | Official Raspberry Pi 3 Power Supply 5.1V 2.5A

  • SD card used | SanDisk Ultra 16GB

Additional Information (if applicable)

  • Software title | docker-compose
  • Was the software title installed freshly or updated/migrated? Fresh install
  • Can this issue be replicated on a fresh installation of DietPi? Yes
    ← If you sent a β€œdietpi-bugreport”, please paste the ID here β†’
  • Bug report ID | 9129a2c5-dec3-4d1a-a45c-02395a6df744

Steps to reproduce

  1. Download latest DietPi image from the dietpi.com for ARMv8.
  2. Flash the SD Card with it using the Raspberry Pi Imager.
  3. Let the first install procedure to complete and use dietpi-software command to install docker, docker-compose, portainer.
  4. Everything installed successfully.
  5. Run command docker-compose -v.
  6. Output -bash: docker-compose: command not found

Expected behaviour

  • Should show the docker-compose version.

Actual behaviour

  • -bash: docker-compose: command not found

You can search for it via find /usr -name docker-compose.
This will give the location: /usr/libexec/docker/cli-plugins/docker-compose

1 Like

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!

1 Like

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:~#

Working ootb on my test system

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 :slight_smile:

Thanks!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.