Rename container when recreating it#1349
Conversation
f830ee6 to
067dd8b
Compare
compose/service.py
Outdated
There was a problem hiding this comment.
I think there is one possible failure case here. If compose crashes between this line , and the remove() line, the old container will be left with the temporary name.
The next time compose runs, it wont recreate (since the container has a different name now), and any volumes will be new instances. The old volumes will still be attached to the temporary container, so they shouldn't be lost.
There was a problem hiding this comment.
This is also possible right now, isn't it? If Compose crashes after creating the intermediate container but before creating the new one, it won't recreate.
It's not ideal, but at least it isn't a regression ^_^
There was a problem hiding this comment.
Tiny thing, but right now this generates names like c8a6039dcecounter_web_1. Could we stick an underscore between the short ID and the name?
|
Should close #919 too. |
Signed-off-by: Daniel Nephin <[email protected]>
067dd8b to
6829efd
Compare
|
Rebased, and added the underscore to the renamed container name |
Rename container when recreating it
…. Will hopefully be fixed by docker/compose#874

Resolves #874 (and a bunch of related bug reports)