Compose missing?

Hi,

I am new to docker and had a look at the introduction at Develop with containers | Docker Docs

It wants me to use ‘compose’, so I copied&pasted the command:

nico@valentin:~/docker$ cd getting-started-todo-app/
nico@valentin:~/docker/getting-started-todo-app$ docker compose watch
docker: ‘compose’ is not a docker command.
See ‘docker --help’
nico@valentin:~/docker/getting-started-todo-app$ docker version
Client:
Version: 20.10.24+dfsg1
API version: 1.41
Go version: go1.19.8
Git commit: 297e128
Built: Fri Apr 18 15:01:23 2025
OS/Arch: linux/amd64
Context: default
Experimental: true

Server:
Engine:
Version: 20.10.24+dfsg1
API version: 1.41 (minimum version 1.12)
Go version: go1.19.8
Git commit: 5d6db84
Built: Fri Apr 18 15:01:23 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.20~ds1
GitCommit: 1.6.20~ds1-1+deb12u1
runc:
Version: 1.1.5+ds1
GitCommit: 1.1.5+ds1-1+deb12u1
docker-init:
Version: 0.19.0
GitCommit:

What is missing?

Hello,
it seems that you are using a pretty old version of docker - on my dev-system I am using docker version 28.2.2. So best would be to update your docker-installation to an up-to-date version.
Alternative is to check if you can use docker-compose instead of docker compose. But this comes with a minimal different format for the docker-compose.yml - at least it has to start with a version: 3 (or whatever version of docker-compose.yml you are using).

The output of docker info indicates that you use a docker package from the distribution repository. If you follow the installation instructions from the Docker docs, it will install all required packages, including the compose cli plugin.

Thank you, using a more recent version fixed it.

on a second computer “docker compose watch” works with
nico@mendelssohn:~ > docker version
Client:
Version: 28.0.1
API version: 1.48
Go version: go1.24.4
Git commit: 068a01ea9470df6494cc92d9e64e240805ae47a7
Built: Fri Jun 20 21:22:35 2025
OS/Arch: linux/amd64
Context: default

Server:
Engine:
Version: 28.0.1
API version: 1.48 (minimum version 1.24)
Go version: go1.24.4
Git commit: bbd0a17ccc67e48d4a69393287b7fcc4f0578683
Built: Fri Jun 20 20:34:05 2025
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v2.0.2
GitCommit: c507a0257ea6462fbd6f5ba4f5c74facb04021f4
runc:
Version: 1.2.5
GitCommit: 59923ef18c98053ddb1acf23ecba10344056c28e
docker-init:
Version: 0.19.0
GitCommit: de40ad007797e0dcd8b7126f27bb87401d224240