restarting the service "on-failure" can easily cause services to loop around repeatedly if the container is misconfigured. This hinders debugging.
"on-abnormal" will ensure the container remains stopped whenever it fails with an error code, but will restart in other circumstances, including timeouts and core dumps.
note- this wouldn't be best practice if we used Docker Hub or any other rate limited registry, as the rate-limiting causes timeouts, which are considered an abnormal failure, triggering a restart, and a pull, which will keep the user limited. "on-abort" should be used in that case.
restarting the service "on-failure" can easily cause services to loop around repeatedly if the container is misconfigured. This hinders debugging.
"on-abnormal" will ensure the container remains stopped whenever it fails with an error code, but will restart in other circumstances, including timeouts and core dumps.
note- this wouldn't be best practice if we used Docker Hub or any other rate limited registry, as the rate-limiting causes timeouts, which are considered an abnormal failure, triggering a restart, and a pull, which will keep the user limited. "on-abort" should be used in that case.