User defined networks

Commands

docker network ls
docker network create test
docker container run -it --rm --network test --name c1 alpine sh

In a second terminal:

docker container run -it --rm --network test --name c2 alpine sh
ping c1

To clean up:

docker network rm test

Container communication

The CLI