Hi,
I'm trying out Dagger for local development and am having some issues with the healthcheck of a service.
I'm defining a service using the official Kafka image like this:
kafkaService := dag.Container().
From("apache/kafka:3.8.0").
WithMountedCache("/tmp/kraft-combined-logs", dag.CacheVolume("kafka-data")).
WithExposedPort(9092).
WithExposedPort(19092).
AsService()
This works fine when I run it with docker compose (with the appropriate environment variables) but with dagger the healthcheck always fails:
✘ 9092/tcp 19092/tcp 0.9s
! checking for port 9092/tcp: context canceled
┃ 16:44:07 WRN port not ready error="dial tcp 10.87.0.35:9092: connect: connection refused" elapsed=14.421625ms
┃ 16:44:07 WRN port not ready error="dial tcp 10.87.0.35:9092: connect: connection refused" elapsed=118.574917ms
┃ 16:44:07 WRN port not ready error="dial tcp 10.87.0.35:9092: connect: connection refused" elapsed=310.343542ms
┃ 16:44:07 WRN port not ready error="dial tcp 10.87.0.35:9092: connect: connection refused" elapsed=497.743584ms
Kafka needs something like 5s to propertly start up but it seems like the healthcheck fails too fast, is there a way to control the healthcheck intervals ? Or am I missing something ?