-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add timeout to --wait option #10269
Comments
Hiya @mitasov-ra, thanks for the report. Regarding what you mentioned (Compose waiting forever when using |
This indeed has been fixed for container to immediately exit on start. |
I'm having the same issue which could be solved with a For example: We deploy on multiple servers, and one had a hiccup that failed the If we had a |
Compose v2.17 breaks scripts using |
flag was indeed renamed by mistake (and nobody noticed during PR review 😰), still |
Thanks no problem it happens. And I was happy when I realized I could change scripts to -t for compatibility. Maybe a release note can be added about that. Hopefully you can rename back to --timeout (and no one uses --waitTimeout) before the next compose release in Docker for Desktop. |
Sure, I added a note on https://github.com/docker/compose/releases/tag/v2.17.2 |
Could you tell me this Edit: As far as I see its starts after the container creation |
Description
Assume I have the
docker-compose.yml
file with single servicefoo
which guaranteed to fail immediately after I start it.If I run
the command will wait forever for Healthy status of
foo
. Literally forever.I think the lack of
--wait-timeout
or just--wait <timeout>
option renders this behaviour utterly useless.Yes, I foresee one can suggest wrap
docker-compose up --wait
in some code with timeout or use some command (liketimeout
or so), but why then we havehealthcheck
with all theinterval
,timeout
andretries
configurations?It's really disappointing to see such a good feature being so poorly implemented.
P.S. Also, it seems to be a good idea not only implement timeout configuration but also add possibility to specify list of services to be waited for. And I think there's more possible enhancements.
P.P.S. On second thought, if
--wait
fails on any configuredhealthcheck
failure then it already can be called very useful. But again, what if there's no configuredhealthcheck
s?The text was updated successfully, but these errors were encountered: