Repository navigation
|
I have set up a simple Using This is perfectly reproducible on my laptop, and I am really running out of ideas why Testcontainers thinks the container is not healthy?! 🤔 |
Replies: 3 comments 2 replies
|
Check the docker inspect --format '{{json .Config.Healthcheck}}' <image>Docker runs the first check only after one interval. Set a longer timeout: .waitingFor(Wait.forHealthcheck().withStartupTimeout(Duration.ofMinutes(3)))I tested this with Testcontainers 2.0.5 and |
|
I am using |
|
I tried to reproduce this with Testcontainers 2.0.5 on Docker 29.8.2 (Windows, Docker Desktop), and
So my guess is that the container Testcontainers starts is not the same as the one from your The quickest way to tell is to look at the Testcontainers container while it is still waiting: docker ps # find the container Testcontainers started
docker inspect --format '{{json .State.Health}}' <container-id>
If it turns out to be something else, the output of that |
Thank you for your kind help so far. 👍
In fact the problem has gone meanwhile. It simply was a port mismatch within the container image itself, which happend only under very specific cases - which I happend to have in my specific test. Nothing of the chain of effects was related to or actually caused by Testcontainers.
Having said that, closing the discussion hereby.
Again, thanks for everything! ❤️