Open n-tucker opened 1 year ago
Hey @n-tucker thanks for reporting this issue. I think this could be related to #1373 too. We added a docker host resolution algorithm and taking a deeper look, it's not taking into account the InAContainer function. Please look at this another issue that was solved for the k3s module: #1289
I'll be working on this next week.
Testcontainers version
0.21.0
Using the latest Testcontainers version?
Yes
Host OS
Mac
Host arch
ARM
Go version
1.20.3
Docker version
Docker info
What happened?
Hello,
I've been trying to incorporate a testcontainers test in our CI platform. To do this, I'm attempting to run testcontainers within a docker container by running docker-outside-of-docker (as described in the docs here).
I'm encountering an issue using the compose module, as ideally we'd like to reuse our existing docker compose file. It appears that testcontainers can't connect to the container brought up. I've noticed that it creates its own network, so I'm wondering if the container isn't part of the same network as the golang container where I'm running testcontainers from?
Another reason why I think this might be a networking inconsistency with the compose module is if I convert my use of the compose module into a
ContainerRequest
, the test can connect to the target container without errors.Thanks in advance for your help, and happy to provide more info if required!
Relevant log output
Additional information
No response