miércoles, 26 de junio de 2019

Docker Networking

Host/Bridge Network

Host
#docker run --net=host nginx

Bridge Default
#docker run -p 80:80 nginx

Swarm Overlay Network  join nodes
#docker service create --name web \
    --replicas 2 \
    --publish 8080:80 \
    nginx

MacvLan driver

bext@bext-VPCF13WFX:~/$ docker network create -d macvlan --subnet=10.1.0.0/24 --gateway=10.1.0.1 -o parent=eth0 mac_net

bext@bext-VPCF13WFX:~/$ docker run --net=mac_net --ip=10.0.1.2 nginx

null network


Networking plugins

Separate data/control plans
bext@bext-VPCF13WFX:~/$ docker swarm init --advertise-addr eth0 --data-path-addr eth1 
 
bext@bext-VPCF13WFX:~/$ docker swarm join --token XYZ --advertise-addr eth0 --data-path-addr eth1 10.0.0.1:2377


ref
Practical design patterns in Docker networking
https://www.youtube.com/watch?v=PpyPa92r44s

eot

No hay comentarios:

Publicar un comentario