Better documentation for docker compose start/stop/restart
for named projects #21794
Description
Is this a docs issue?
- My issue is about the documentation content or website
Type of issue
I can't find what I'm looking for
Description
I am unable to restart or stop my compose project unless I add the -p
tag. This happens when a name is assigned to a project (doc).
For example, docker compose start/stop/restart SERVICE
simply runs without doing anything (no errors).
The only way to restart/stop my project is by using:
docker compose -p PROJECT_NAME start/stop/restart
.
This behavior is not explained in the documentation. I only figured it out after reading a StackExchange question (link).
This behavior might affect other commands too.
Location
https://docs.docker.com/reference/cli/docker/compose/start/
https://docs.docker.com/reference/cli/docker/compose/stop/
https://docs.docker.com/reference/cli/docker/compose/restart/
Suggestion
It would be great if the docs could mention this, as it is quite unintuitive and pertains to very common operations.