创建docker网络
sudo docker network create –driver=ipvlan –subnet=192.168.8.0/24 –gateway=192.168.8.1 -o parent=eth2 my_network
创建容器
sudo docker create -it –hostname=docker-ubuntu20.04-4 –add-host=ubuntu20.04-4:192.168.55.102 –name=ubuntu20.04-4 –restart always –privileged=true ubunut20.04:v3 /sbin/init
用已有的容器创建一个镜像
sudo docker commit –author “somebug.cn” -m “ubuntu20.04” ubuntu20.04-4 ubunut20.04:v2