Any idea why docker.for.mac.localhost would work in one container but not another?

I am working with a docker orchestration tool called Praxis (which is the newest version of Convox). I am running into an odd issue that I am trying to help to project maintainers get to the bottom of. I have a non-dockerized DB server running on my host machine, and I’m trying to connect to it from inside containers using the newly released docker.for.mac.localhost hostname. When I launch a container using one of the praxis commands (cx start) this works just fine, but when I launch a container using their built in container testing command (cx test) that hostname cannot be found inside the container.

My question is not necessarily about Praxis, but more about what mechinisms are at play with docker.for.mac.localhost so that I can help dig deeper to determine why it is available in one container but not another?

Is there some kind of network setting could be set when launching a container that could be preventing that hostname for being available?

Any guidance or insight on how docker.for.mac.localhost works will be greatly appreciated.

1 Like