How much time will docker wait before showing a health as unhealthy from starting?

oslon

Member
Joined
Oct 15, 2023
Messages
40
Reaction score
6
Credits
424
Here are the commands that I used for reference:

Code:
docker run -dt --name tmp --health-cmd "curl -f http://localhost" busybox sh
docker ps
docker ps
docker ps

After few minutes, docker ps will show "health as unhealthy".

The default healthcheck options are these:

Code:
HEALTHCHECK --interval=5s CMD ping -c 1 172.17.0.2
--interval=DURATION(default:30s)
--timeout=DURATION(default:30s)
--start-period=DURATION(default:0s)
--retries=N(default:3)
So, how is the time calculated here? Any idea?
 

Members online


Top