I’m using compose to start many containers (apache, mysql, slurm, ftpd).
The containers need to talk (IP) to the others.
What is the good solution to achieve that.
- I could setup the IP’s when running the containers and have hard
coded config files with those IP’s, looks ugly to me and I think
don’t fit with Docker philosophy.
- I could made a script that does
docker inspect the container after the run and send the configs to
the vm, i don’t like it too.
- I could map ports from the Docker host
to the container internal ports, so all could talk to the Docker host
IP with those specific ports. (In that case i see in the forum a pending question, how to get the docker host ip in the container)
Which one is the best, or is there another way ?