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
docker run, add restart option "limited" #47801
Comments
So, IIUC, the proposal is effectively to have I should add that I'm not sure if we currently want to expand options for restart-policies, as they are already somewhat crossing the line between container runtime and orchestration (and there's some already nasty parts in the current implementation) |
Yes. Yes I understand that it goes on the orchestration part. I asked in docker-compose but they, correctly, sent me here. If one uses at most docker-compose as a docker wrapper, which other tool could cover this case without bloating the stack of tools that one needs to use? |
Description
The documentation as today (2024-05-06) is
the
restart=on-failure:3
almost covers the request. Theon-failure:3
restarts 3 times the container if the container exits with a "bad" status code. Instead sometimes one wants to give a limited number of restarts (and then one needs to investigate) to containers that may exit with a good status code (likeexit 0
).Yes I know, the application should be good enough to exit with a proper status code in case of error, but in the real world not all applications exit with proper status codes. Therefore a
restart=limited:3
could help in this case.Hopefully it could be implemented without a major effort. Thank you!
The text was updated successfully, but these errors were encountered: