Container communication

Commands

First terminal

docker container run --rm -it --name c1 alpine sh
ping 172.16.0.3
ping c1
cat /etc/hosts

Second terminal

docker container run --rm -it --name c2 alpine sh
ping 172.16.0.2
docker container run --rm -it --name c2 --link c1 alpine sh
ping c1

Isolation

User defined networks