CI that keeps up
← Changelog
v0.20.1 · Mar 5, 2026

Service API honors Docker healthchecks

Services can now use Docker HEALTHCHECK commands to determine readiness, replacing the default port-based check. Define healthchecks in a Dockerfile or with the new withHealthcheck() API.

srv := dag.Container().
  From("python").
  WithDefaultArgs([]string{"python", "-m", "http.server", "8080"}).
  WithHealthcheck([]string{"curl", "-sf", "http://localhost:8080/"},
    dagger.ContainerWithHealthcheckOpts{
      Timeout:   "3s",
      Retries:   3,
    }).
  AsService()