码迷,mamicode.com
首页 > 其他好文 > 详细

docker registry 安装步骤

时间:2017-09-14 23:53:52      阅读:299      评论:0      收藏:0      [点我收藏+]

标签:docker

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 --name registry registry:2



$ docker pull ubuntu:16.04



$ docker tag ubuntu:16.04 localhost:5000/myfirstimage



$ docker push localhost:5000/myfirstimage



$ docker image remove ubuntu:16.04



$ docker image remove localhost:5000/myfirstimage



$ docker pull localhost:5000/myfirstimage



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/myfirstimage


docker registry 安装步骤

标签:docker

原文地址:http://dek701.blog.51cto.com/600550/1965366

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!