docker-compose by default sets up a user-defined network for the services so they can talk to each other using the service name (so you don't need to find out their IP).
If you really wanted however you could setup multiple containers with the same network stack (breaking some of the isolation. With this setup other containers can access them via their ports through localhost but that also allows them to see all of their network traffic.
Example: https://pastebin.com/raw/U7CHqQFf
Have a look at https://docs.docker.com/compose/networking/ and https://docs.docker.com/compose/compose-file/#network_mode
RE: Docker First Impressions
You are viewing a single comment's thread from:
Docker First Impressions
Yeah, this was my first take on docker. It's pretty dated and overly complicated. The IP is the name of the service though configuring the app via ENV would be needed still. Essentially https://12factor.net/ is very helpful to getting docker to work well with your app.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit