-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
Description
If we have a compose file with two services A and B, where B depends_on A then the following used to be the scenario.
docker compose up -dwould start bothservice-aandservice-bas expected.
If afterwards we ran
docker compose up -d service-bthen nothing would happen. We'd just getcontainer service-b Running.
This was true until at least Docker Compose version v2.15.1. However at least from Docker Compose version v2.26.0 when running command 2 above we recreate service-b even if nothing actually changed. This is also the case with the latest compose version v2.29.2.
- Running
docker compose up -dwill recreateservice-bagain which, again, didn't use to happen.
I had a look and I suspect that this happens because when starting a container with no-deps, the com.docker.compose.depends_on label is now empty, when before it wasn't. I think that this is the diff that causes the container to be recreated.
So this seems to be an unintended regression and it does make docker compose rather more finicky than before so hopefully it can be fixed.
Steps To Reproduce
No response
Compose Version
No response
Docker Environment
No response
Anything else?
No response