-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Compose v2 is recreating ALL containers where there is a change to one of the "depends_on" in the hierarchy (bring back compose v1 behaviour) #10308
Comments
With #10284 you can now explicitly opt-in/out for dependent container to be restarted when a service is recreated. |
Can you please share how to configure this in compose file? Or link to the docs :) I couldn't see a reference in the MR. |
Hi @ndeloof , These are the steps I followed:
Sample docker-compose.yml file:
Have I made a mistake in the config, or is it just not working as expected? |
Having same issue as decribed in #10308 (comment) with Compose v2.24.6 (latest from Ubuntu 24.04 feed) |
@ndeloof Please can you provide the example of correct usage this option? |
I have now spent some time looking into this issue, and as far as I can tell, the There's a pair of flags for Unfortunately, the observed behavior seems to be as if |
Description
Separating out an issue described on #9600
Basically, this comment (#9600 (comment)) encompasses this issue. Sometimes containers are completely recreated when we do not expect them to, and when using "depends_on", and a dependant container changes in some way, all of the children are restarted. In compose v1.X, this is NOT the case, and ONLY the changed container is recreated and all others are untouched.
Either this is a bug, or a feature request to bring back compose v1 behaviour (at least with a flag).
Steps To Reproduce
Refer #9600 (comment)
Compose Version
Docker Environment
Anything else?
Refer to #9600 for alot of history.
The text was updated successfully, but these errors were encountered: