kolla镜像自从P版以后就没有向之前版本直接下载一个tar然后放入仓库那么简单了。
正式开始搭建仓库:
1、启动仓库容器
docker run -d -v /opt/registry:/var/lib/registry -p 4000:5000 --restart=always --name registry registry:2
查看镜像服务器
[root@kolla1 kolla]# curl 127.0.0.1:4000/v2/_catalog
{"repositories":[""]}
查看本机docker 镜像
[root@kolla1 kolla]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
kolla/centos-binary-nova-compute queens 5cf24be93c30 47 hours ago 1.39GB
kolla/centos-binary-nova-compute-ironic queens fc77d637e4b8 47 hours ago 1.32GB
kolla/centos-binary-neutron-server-opendaylight queens f743c3a10ffb 47 hours ago 860MB
kolla/centos-binary-cinder-backup queens 98456bed9ad5 47 hours ago 970MB
kolla/centos-binary-cinder-api queens cb51181fe94d 47 hours ago 1.03GB
kolla/centos-binary-panko-api queens c587b913c99c 47 hours ago 784MB
本地镜像上传至仓库就是打个tag
[root@kolla1 kolla]#docker tag kolla/centos-binary-barbican-api:queens 127.0.0.1:4000/kolla/centos-binary-barbican-api:queens
上传刚才的镜像到私有仓库
[root@kolla1 kolla]#docker push 127.0.0.1:4000/kolla/centos-binary-barbican-api
查看仓库:
[root@kolla1 kolla]# curl 127.0.0.1:4000/v2/_catalog
{"repositories":["kolla/centos-binary-barbican-api"]}
此过程还是比较麻烦如果有更好方法请留言