![[Docker] Getting Started with Container Networks [Docker] Getting Started with Container Networks](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
It is possible to group containers into a network and we can create multi networks so that container in each isolated network can communiate with each other, but we can fine control the access right by using network, how containers communiate should happen inside network.
In this post, we are going to see how to create a network and how to run a container inside a network.
Create a network:
docker network create --driver bridge isolated_network
Run containers in the Container Network
docker run -d --net=isolated_network --name mongodb mongo
Give every container you want to link into the network a name.
in next post, we will see how to do it in a real world example