Connecting different services running on multiple Docker containers (dev environment)
MD
R
MarkdownScenario: 3 containers running services on localhost (mongo, rmq, nginx). 1 container trying to connect to these services. Problem: you can't connect to localhost, as this 3 containers have designated IP addresses (eg. 127.x.x.x). Discover the IP's and replace your old localhost mappings.
Identify the IP addresses assigned to the Docker service containers (eg. mongo, rmq, nginx)
docker inspect <container_service_name> | grep IPAddress
Update your configurations mapping object
touch env/development/config.json
Replace the localhost with the Service Containers assigned IP.
Example: "mongodb":"mongodb://172.17.0.2/ctw_recipes"
Restart the container which you want to connect from
Created on 6/23/2017