Skip to content

Documentation for the --interval flag of the HEALTHCHECK instruction is incorrect #24096

@ras07

Description

@ras07

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

According to https://docs.docker.com/reference/dockerfile/#healthcheck :

The health check will first run interval seconds after the container is started, and then again interval seconds after each previous check completes.

(Italics mine)
This doesn't appear to be accurate - by my testing, the health check runs immediately* upon container startup (and then runs again interval seconds after each previous check completes).

*Technically I think the health check may run --start-interval seconds after container startup (defaults to 5 seconds). So the corrected docs perhaps should read:

The health check will first run start-interval seconds after the container is started, and then again interval seconds after each previous check completes.

But I haven't tested --start-interval extensively. (--interval definitely doesn't work exactly as documented, however.)

Location

https://docs.docker.com/reference/dockerfile/#healthcheck

Suggestion

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions