-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Healthcheck not working for docker in docker. #856
Comments
Hi @zbindenren and sorry for the delay. Gnomock supports |
Hi @orlangure If I set the
because we do not listen on a tcp port (only docker socket). I even changed the health check to use the correct runner, but I still get a connection refused. I wonder what this line says:
Does |
Another thing to try is |
Faced with the same issue |
Hey @aurelius15, |
Hi orlangure, Yes, I tried mentioned suggestions, and they did not work. But after going through sources, I found a solution for my case. I have added GNOMOCK_ENV variable to my ci configuration and also added a few lines of code.
The tricky part is that healthcheck finds the correct IP address if GNOMOCK_ENV is present but the rest of code no. I think it might be fixed in |
Have you tried setting docker host variable to your host address? I'll need a reproducible example to help more, something I can run and debug. |
Describe the bug
Our go tests run in docker containers via gitlab runners. In order that this works the docker socket is mapped inside the container. Everythink works (container starts), but I get a timeout because the health check tries to connect via localhost.
It would be nice to have a possibility to set the Host to a something else than 127.0.0.1 (ip of the host where docker runs on in my case) for the health checks. Then I think everyhing would work.
Am I missing something?
The text was updated successfully, but these errors were encountered: