Restart policies, and what unhealthy does not do
Select an icon to see what it is.
Step 4 of 6
on-failure:3 gives up
After the third restart also fails, the retry limit is reached. dockerd leaves the container exited and RestartCount stays at 3. With plain on-failure and no number, it would keep trying.
$ docker inspect --format '{{.State.Status}} {{.RestartCount}}' flakyGET /v1.45/containers/f2a3b4c5d6e7/json
{"State": {"Status": "exited""Running": false"Restarting": false"ExitCode": 1}"RestartCount": 3}