Docker: Network

Melihat list docker network ls

Membuat network docker network create --driver Driver yang bisa dipakai:
 * (default): Diguakan ketika aplikasi didalam sebuah container membutuhkan komunikasi dengan aplikasi lain yang ada di container lain. Misalnya mongo dengan mongo-express
 * : For standalone containers, menghapus pembatas antara container dan docker host, dan akan menggunakan host's networking directly
 * : Overlay networks connect multiple Docker daemons together and enable swarm services to communicate with each other. You can also use overlay networks to facilitate communication between a swarm service and a standalone container, or between two standalone containers on different Docker daemons. This strategy removes the need to do OS-level routing between these containers
 * : IPvlan networks memberikan users total control addressing baik IPv4 dan IPv6. The VLAN driver builds on top of that in giving operators complete control of layer 2 VLAN tagging and even IPvlan L3 routing for users interested in underlay network integration.
 * : Macvlan networks memungkinkan kita untuk memberikan MAC address ke sebuah container, membuatnya terlihat seperti physical device dalam sebuah jaringan. The Docker daemon routes traffic to containers by their MAC addresses. Using the  driver is sometimes the best choice when dealing with legacy applications that expect to be directly connected to the physical network, rather than routed through the Docker host’s network stack
 * : For this container, disable all networking. Usually used in conjunction with a custom network driver.  is not available for swarm services

Menghapus network. Pastikan tidak ada container yang menggunakan network docker network rm

Assign network ke container dilakukan pada saat membuat container docker container create --name  --network  ....

Assign network ke container pada saat container sudah dibuat docker network connect  

Cara dissasign network dari container docker network disconnect  