-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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 needlessly recreating containers when NO changes have been made #10307
Comments
This regression was introduced in 2.16 and fixed by #10275 |
Sorry, there isn't a v2.16.1 tag or release... |
My bad, next release is v2.17.0 |
can i expect a release date? |
release candidate is available, I can't tell about final release date |
As per my comment and testing here -> #10308 (comment) this looks resolved. |
Description
Separating out an issue described on #9600
[BUG] Compose v2 is needlessly recreating containers when NO changes have been made. Towards the end of the troubleshooting, you will see I make a change to an image tag and run "docker compose up -d" multiple times, and it recreates all the containers every time.
I have spent some more time troubleshooting this.
Using this docker-compose.yml. Note that no services rely on image3:
Performed the following:
All the hashes are correct:
Then, I changed the image tag of image1:
Only image1-1 hash changed (which is expected), however, all other containers are recreated (except image3, again noting none of the other services depend on it).
I have tested this on compose 2.16.0, 2.15.1 and even 2.0.1 and all have the same behviour.
I retested using the latest version of compose v1 i.e 1.29.2 and the issue is NOT present, so it clearly it something to do with how v2 handles dependant images:
Then, I went back to 2.16.0 to do some more testing:
Made no changes, and looks good, no action taken. And no changes after running the command 3 times in a row.
Again, modified the image tag of 1 of the images:
Tried it a few more times, and it still recreates the containers:
Steps To Reproduce
As per description.
Compose Version
Docker Environment
Anything else?
Refer to #9600 for alot of history.
The text was updated successfully, but these errors were encountered: