搭建docker 私有仓库
#server配置
$ mkdir /mnt/registry
$ docker run -dit -v /mnt/registry://var/lib/registry -p 5000:5000 --restart always --name registry registry:2
$ firewall-cmd --permanent --add-port=5000/tcp
$ firewall-cmd --relocad
#client 配置
在”/etc/docker/“目录下,创建”daemon.json“文件。在文件中写入:
{ "insecure-registries":["192.168.1.100:5000"] }
systemctl restart docker
$ docker pull centos
$ docker tag centos serverip:5000/centos
$ docker push serviceip:5000/centos
来源:51CTO
作者:bard_zhang
链接:https://blog.51cto.com/timefiles/2115342