Skip to content

Add argument to docker start+run to block until healthcheck passes #7135

Open

Description

@ccope

Description

Description

Related to moby/moby#45897

Add an argument for starting a daemonized container that blocks until a timeout (returning error) or the healthcheck passes. Maybe something like --health-timeout-startup? This would nicely simplify CI scripts that spawn containers before running tests.

Activity

  1. ccope commented on Jul 29, 2026

    @ccope
    Author

    I'm thinking this shouldn't halt the container after the timeout expires to allow for debugging, but I can see an argument for stopping it. I think it also makes sense to make it an error to use this argument with containers that lack a health check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions