I have a build machine that has several CI Build Runners running via docker-compose .
These runners build and test my server. In order to test my server, I have to run another docker-compose to start up a database and a few other mock servers (so it’s docker-compose inside of docker-compose). When I run the test servers locally, I can access them via localhost:3306 and localhost:4000 , but that doesn’t seem to work when running everything from docker inside of docker. The containers appear to be starting correctly though, but are just not accessible via localhost
What is the proper url that I should be calling to access those docker-compose servers from inside my docker container?
I need to ping them from outside the webserver. I’m running my tests inside my CI, which is running in a separate docker container. From that docker container I need to be able to call into the services that I start with docker-compose to run my tests.
Everything within Docker should be able to use container names as DNS records for other containers (I think).
So if you have a container called “runner” then any other container should be able to access the container called “runner” using the DNS address “runner”.
In terpz example above, his webserver accesses the database using db:1433.
This is helpful. So I have 12 CI containers running on a single machine. Is there a way, while I’m inside of the container, to get its current gateway ip?