Docker વિવિધ નેટવર્ક ડ્રાઈવર્સ (bridge, host, overlay, macvlan, none) વિવિધ કનેક્ટિવિટી જરૂરિયાતો માટે પ્રદાન કરે છે, તેમજ યુઝર-વ્યાખ્યાયિત નેટવર્ક્સ જેમાં DNS-આધારિત સર્વિસ ડિસ્કવરી જેવી સુવિધાઓ છે. મલ્ટી-કન્ટેનર અને મલ્ટી-હોસ્ટ એપ્લિકેશનોને સાચીરીતે જોડવા માટે નેટવર્કિંગને ઊંડાણથી સમજવું મહત્વપૂર્ણ છે.
નેટવર્ક ડ્રાઈવર્સ
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).
