Docker ਵੱਖ-ਵੱਖ network drivers (bridge, host, overlay, macvlan, none) ਵੱਖ-ਵੱਖ ਕਨੈਕਟੀਵਿਟੀ ਲੋੜਾਂ ਲਈ, ਨਾਲ ਹੀ user-defined networks ਅਤੇ DNS-ਆਧਾਰਿਤ service discovery ਵਰਗੀਆਂ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਪ੍ਰਦਾਨ ਕਰਦਾ ਹੈ। ਬਹੁ-ਕੰਟੇਨਰ ਅਤੇ ਬਹੁ-ਹੋਸਟ ਐਪਲੀਕੇਸ਼ਨਾਂ ਨੂੰ ਸਹੀ ਤਰੀਕੇ ਨਾਲ ਜੋੜਨ ਲਈ ਨੈਟਵਰਕਿੰਗ ਨੂੰ ਗਹਿਰਾਈ ਵਿੱਚ ਸਮਝਣਾ ਮਹੱਤਵਪੂਰਨ ਹੈ।
Network drivers
BRIDGE (default) → a private internal network on a single host; containers communicate;
isolated from the host except via published ports. USER-DEFINED bridges add DNS
(containers reach each other by name) — preferred over the default bridge.
HOST → the container uses the host's network stack directly (no isolation, no port
mapping needed) — max performance, less isolation.
OVERLAY → spans MULTIPLE hosts → containers on different machines communicate
(for Docker Swarm / multi-host clusters).
MACVLAN → gives a container its own MAC/IP on the physical network (appears as a
physical device).
NONE → no networking (fully isolated).
