私有仓库
搭建
下载registry镜像:docker pull registry
-----可配置加速器加速下载
启动
docker run -d --name reg -p 5000:5000 registry
然后可以通过restful接口查看仓库中的镜像(当前仓库是空的)
配置http传输
私服默认只能使用https,需要配置开放http
bip 配置当前docker启动的容器全为5段的IP 可以不设置
配置完毕重启下docker服务
systemctl daemon-reload
systemctl restart docker
创建本地镜像
192.168.244.7当前宿主机IP
docker tag hello-world 192.168.244.7:5000/hello-world
向私有仓库推送
docker push 192.168.244.7:5000/hello-world
查询镜像:
http://192.168.244.5:5000/v2/_catalog
查询hello版本: http://192.168.244.5:5000/v2/hello/tags/list