docker registry部署
docker run -d -p 5000:5000 --restart=always --name registry \
-v `pwd`/data:/var/lib/registry \
registry:2
docker pull ubuntu
docker tag ubuntu localhost:5000/myfirstimage
推他:
docker push localhost:5000/myfirstimage
拉他:
docker pull localhost:5000/myfirstimage
在客户端配置:编辑daemon.json,配置registry服务端的地址并重启docker
[root@zabbix docker]# cat /etc/docker/daemon.json
{ "insecure-registries":["192.168.36.106:5000"] }
查看docker仓库里有哪些镜像:
[root@zabbix docker]# curl -XGET http://192.168.36.106:5000/v2/_catalog
{"repositories":["node"]}