sincecutoff.com
← all changes

nerdctl compose supports service healthcheck

Introduced 2026-05-21 · score 0.94

HOW TO USE IT

When maintaining a repository’s container setup, add a `healthcheck` mapping to the Compose service to define how its containers are checked for health. nerdctl v2.3.1 documents `healthcheck.start_interval` as unimplemented.

services: <service>: healthcheck: test: ["CMD", "curl", "-f", "http://localhost"] interval: 1m30s timeout: 10s retries: 3 start_period: 40s

WHY THIS HELPS

Configure a Compose service health check when maintaining a repository's container setup.

REQUIREMENTS AND LIMITATIONS

  • Version: v2.3.1
  • healthcheck.test: Command used to check health; a string or list. A list begins with `NONE`, `CMD`, or `CMD-SHELL`; a string is equivalent to `CMD-SHELL` followed by that string.
  • healthcheck.interval: Duration between checks.
  • healthcheck.timeout: Duration before a check is considered failed.
  • healthcheck.retries: Number of consecutive failures needed to report the container unhealthy.
  • healthcheck.start_period: Duration to wait during container initialization before counting failures toward the retry threshold.
  • healthcheck.start_interval: Duration between checks during the start period. nerdctl v2.3.1 lists this field as unimplemented.
  • Prerequisite: nerdctl >= 0.8 is required for `nerdctl compose`.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card