二:部署私有仓库
docker pull daocloud.io/library/registry:latest
docker run --restart=always -d -p 5000:5000 daocloud.io/library/registry
systemctl stop firewalld
systemctl restart docker
宿主机ip+端口
curl -I 127.0.0.1:5000
将镜像存放在仓库(确定得有镜像 )



systemctl restart docker
镜像存储到仓库中

查看私有仓库里的所有镜像

查看私有仓库里的镜像版本

四:固定容器IP
1.容器网络
docker安装后,默认会创建三种网络类型,bridge、host和none
显示当前网络:docker network list
2.创建固定ip容器
创建自定义网络类型,并且指定网段:
docker network create --subnet=192.168.0.0/16 staticnet
查看: docker network ls
查看网络详细信息:
docker network inspect 网络名字/ID
创建容器

查看容器

