-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Is this a docs issue?
- My issue is about the documentation content or website
Type of issue
Information is incorrect
Description
The CLI reference page for [docker compose down]
currently shows the following usage syntax:
docker compose down [OPTIONS] [SERVICES]
This implies that down supports one or more service names as arguments. However, in current versions of Docker Compose (V2, bundled with Docker 23.x+ / 25.x), the command does not accept service names:
$ docker compose down myservice unknown command "myservice" for "docker compose down"
Expected Behavior (based on docs)
docker compose down myservice
should stop and remove only the specified service(s).
Actual Behavior
docker compose down only works without service names, removing all services in the project. Passing a service name produces an error.
Version(s) Affected
Docker Engine: 23.x, 25.x
Compose V2 plugin: confirmed with 2.20.x and newer
On Docker 20.10.12 (with early Compose V2), the command did appear to accept service names and removed a single container (example: docker compose down myservice removed just that service). This suggests there may have been early partial support that was later removed.
Location
https://docs.docker.com/reference/cli/docker/compose/down/
Suggestion
Update the CLI reference to remove [SERVICES] from the docker compose down usage line, clarifying that the command always applies to the entire project.
Optionally, add a note in the docs explaining that per-service removal should be done with:
docker compose stop <SERVICE...>
docker compose rm -f <SERVICE...>