Skip to content

recreate container after image has been rebuilt/pulled#9261

Merged
glours merged 1 commit intodocker:v2from
ndeloof:recreate_on_image_updated
Mar 10, 2022
Merged

recreate container after image has been rebuilt/pulled#9261
glours merged 1 commit intodocker:v2from
ndeloof:recreate_on_image_updated

Conversation

@ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Mar 10, 2022

What I did
Fix service being re-created after image is rebuilt (docker compose up --build)
This also includes an improvement to set com.docker.compose.image to image ID when image exists in local store, so we can detect image tag been pulled with a refreshed content

Related issue
closes #9259

(not mandatory) A picture of a cute animal, if possible in relation with what you did

@ndeloof ndeloof requested a review from glours March 10, 2022 09:50
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof force-pushed the recreate_on_image_updated branch from abe0c69 to 85a4d04 Compare March 10, 2022 10:03
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@glours glours merged commit dc6097d into docker:v2 Mar 10, 2022
@ndeloof ndeloof deleted the recreate_on_image_updated branch March 13, 2022 12:46
@ghost
Copy link

ghost commented Mar 18, 2022

Thank you for the fix and your work!
We hope to see the v2.3.4 soon including this fix ;-)

Just FYI, Plextrac solution is using docker and we had to revert back docker-compose to v2.2.x to get the new instance management script working again. The update procedure was git pulling the updates but no longer recreating the containers to use the updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker compose up no longer recreates container if image is updated

2 participants