docker pull centos
docker network create --subnet=172.18.0.0/16 mynetwork
docker run -itd --privileged --name centos1 --net mynetwork --ip 172.18.0.11 centos:latest /usr/sbin/init docker run -itd --privileged --name centos2 --net mynetwork --ip 172.18.0.12 centos:latest /usr/sbin/init docker run -itd --privileged --name centos3 --net mynetwork --ip 172.18.0.13 centos:latest /usr/sbin/init
docker ps docker inspect 容器ID或容器名稱