도커에서 지원하는 가상화 네트워크 정리

Background

Container로 가상화되면 밖의 Host와 다른 Container와 격리됨

결국 자신의 interface

Network

The Docker daemon performs dynamic subnetting and IP address allocation for containers. Each network also has a default subnet mask and gateway.

DNS

driver

DriverDescription
bridgeThe default network driver.
hostRemove network isolation between the container and the Docker host.
noneCompletely isolate a container from the host and other containers.
overlayOverlay networks connect multiple Docker daemons together.
ipvlanIPvlan networks provide full control over both IPv4 and IPv6 addressing.
macvlanAssign a MAC address to a container.

Practice

$docker run -dit --name Rock ubuntu
$docker exec -it Rock bash
$ifconfig

$docker network create -d