Réseau
Création d'une interface réseau :
docker network create lan -d macvlan --subnet=172.16.12.0/24 --gateway=172.16.12.250 -o parent=ens192
docker network create --driver bridge --subnet 172.18.0.0/16 lan
Lister les réseaux :
docker network ls
Visualiser l'adresse IP d'un container :
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nomdudocker
Lister les IP de tous les containers docker :
docker inspect --format='{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)
iptables -t raw -D PREROUTING ! -i br-9e59056620d1 -d 172.18.1.14 -j DROP