4 ms·
I've got one compose that has like five web-services in it. And I had a heck of a time getting a config that allows each contained thing to see the others - and
by djbusby 3y ago
I've got one compose that has like five web-services in it. And I had a heck of a time getting a config that allows each contained thing to see the others - and also be visible outside. For now I'm using fixed IPs in the compose to get it so it's all visible. Now, the network can be overwrite via env but I wish I knew an easier way to get containers visible to outside and each other easier. Else, in the service I'd have to have two references to the other services: the internal name and external name.
- ponector 3y agoI use extra_hosts parameter for this particular scenario
- idonttalkenough 3y ago>And I had a heck of a time getting a config that allows each contained thing to see the others Use a utility container to learn some of the network/options of docker. The network-multitool[1] container is a good one I use. So for example, create a few containers in a manifests/compose file with different network settings and try pinging, telneting, etc from one container to another. This container can also be used to help debug workload containers that are having connectivity issues. If you need more tooling just create an image with this container as a base. [1]https://github.com/wbitt/Network-MultiTool https://github.com/wbitt/Network-MultiTool