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
Start containers as soon as they are ready #11783
Comments
Would be a significant architectural change For the scenario you describe, it seems to me relying on |
Yes I had a feeling this would not be an easy one, so I definitely don't expect anything unless it is useful for many people! As said, I can mostly emulate this behavior by doing a smaller That becomes especially aggravating when the changes are in a part you don't care about at that moment: you have 10 rebuilding containers, and you just want to work on that one container right now! In any case, a workaround is available, but it could be more 'hands-off' by starting containers as soon as they are ready. |
Oh, I found another use case! Some development containers have quite a long initialization phase: for example the Angular development server compiles source code on-the-fly (for hot-reloading support), but it can only start once the container starts. It would save quite some time if it could already start compiling even though some other services are still in the build phase. |
Description
When using
docker compose up
(orwatch
), Compose first builds all required images and then starts containers for them. In some workloads, one container is ready to launch much earlier than another.An example: a postgres container is ready almost immediately, while the backend container is still building. During development, it can be quite useful to already start working with the database.
Would it be possible to launch containers as soon as they are ready, not waiting for all images to be built first?
Some observations:
depends_on
another, it obviously must wait until the dependency is readydocker compose up --wait database && docker compose up
The text was updated successfully, but these errors were encountered: