Networking Basics of Docker Containers

Features of Linux virtual bridge: (docker0)
1. IP address can be set
2. It is equivalent to having a hidden virtual network card to
Networking Basics of Docker Containers
install bridge management tools:
[root@i-wx7sdofs ~]# yum install bridge-utils
Modify docker0 address: (Used when there are specific needs)
$ ifconfig docker0 192.168.200.1 netmask 255.255.0
Add virtual bridge:
$ brctl addbr br0
$ ifconfig br0 192.168.100.1 netmask 255.255.255.0
Change the startup configuration of the docker daemon:
/etc/default/docker Add DOCKER_OPS value in
-b=br0

--link access the container by specifying the code name of the container to avoid the IP address change due to restarting the container)
$ docker run --link=[ CONTAINER_NAME ]:[ ALIAS ] [ IMAGE ] [ COMMOND ]

Docker daemon startup options
--icc=false --iptables=true
--link

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324832517&siteId=291194637