Day 5/100daysofK8s
Apr 12, 2021
docker run nginx --network none
— creates a container that has no ties to the outer world and that the world cannot reach.
docker run nginx --network host
— creates a container that shares it’s host’s network. If one instance of an image listens to port localhost:80, then the duplicate instance of the image sharing the host’s network cannot listen to the same port.
By default, containers use Bridge
network. An internal private network is created where the host and containers attach to. The default address is 172.172.0.0 and each container on this network are assigned address in that range.