-
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
recreate container when image or dockerfile is updated #1383
Comments
@TomasTomecek I had the same idea a while back... See this moby/moby#11024 |
@aanm you're right, idea is the same; except that I would like to have this implemented in compose, not engine. |
I agree this would be good; for now, you can explicitly name which services you want to recreate:
|
Aha, @aanand so if I created patch for this, would you merge it? (I would probably create new option for |
Let me make sure I understand what you're proposing.
This part I think I understand: if This is sensible, but I'm basically already working on this as part of #1345. It'll eventually be the default behaviour of
This is the part that needs better specifying. How will you detect that the Dockerfile has changed? Are any of the concerns raised about @aanm's proposal in moby/moby#11024 addressed? |
Compose would |
You would need to get the modified time of every file in the build context as well. |
That's true. Maybe it could be configurable. |
Hmm can't re just rebuild the image anyway and let the Docker cache take care of things? If nothing changed all instructions will hit the cache and the image will be unchanged. |
+1 to @prologic |
I'd suggest keeping the dockerfile, or a hash of it, somewhere, and comparing against that instead of using a plain stat()... if possible. |
+1 |
+1 would be very useful |
Does |
@dnephin I think so. Let's close this. I have to say that UX when respinning services improved greatly in last year. |
I'm using
compose
during development and I find it super useful. The only thing is that it takes so long to rebuild my environment (app, db, redis, worker, worker management). My workflow is, that I update one of the services and want to doup
right away. Unfortunatelycompose
recreates all containers, not just the one I updated.Do you think it would make sense, if:
I'll gladly provide patch for this.
The text was updated successfully, but these errors were encountered: