You are viewing a single comment's thread from:

RE: Docker First Impressions

in #docker6 years ago

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

Sort:  

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.

Coin Marketplace

STEEM 0.19
TRX 0.14
JST 0.030
BTC 60189.57
ETH 3204.49
USDT 1.00
SBD 2.44