docker registry 安装步骤


实验环境


192.168.30.95  //registry server

192.168.30.96  //docker client


操作系统  centos 7.2











//-----------------------------------registry server


$ docker run -d -p 5000:5000 --restart=always --privileged=true --name registry -v /data:/var/lib/registry registry:2


$ docker pull ubuntu:16.04



$ docker tag ubuntu:16.04 localhost:5000/myfirstp_w_picpath



$ docker push localhost:5000/myfirstp_w_picpath



$ docker p_w_picpath remove ubuntu:16.04



$ docker p_w_picpath remove localhost:5000/myfirstp_w_picpath



$ docker pull localhost:5000/myfirstp_w_picpath



curl -X GET http://192.168.30.95:5000/v2/_catalog  //显示私有仓库里的镜像



//----------------------------------------docker client



//Create or modify /etc/docker/daemon.json

//{ "insecure-registries":["myregistry.example.com:5000"] }

//Restart docker daemon

//sudo service docker restart


{ "insecure-registries":["192.168.30.95:5000"] }


systemctyl restart docker


docker pull 192.168.30.95:5000/myfirstp_w_picpath