mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Add health start interval
This adds an additional interval to be used by healthchecks during the start period. Typically when a container is just starting you want to check if it is ready more quickly than a typical healthcheck might run. Without this users have to balance between running healthchecks to frequently vs taking a very long time to mark a container as healthy for the first time. Signed-off-by: Brian Goff <cpuguy83@gmail.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -92,6 +92,9 @@ func merge(userConf, imageConf *containertypes.Config) error {
|
||||
if userConf.Healthcheck.StartPeriod == 0 {
|
||||
userConf.Healthcheck.StartPeriod = imageConf.Healthcheck.StartPeriod
|
||||
}
|
||||
if userConf.Healthcheck.StartInterval == 0 {
|
||||
userConf.Healthcheck.StartInterval = imageConf.Healthcheck.StartInterval
|
||||
}
|
||||
if userConf.Healthcheck.Retries == 0 {
|
||||
userConf.Healthcheck.Retries = imageConf.Healthcheck.Retries
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user