[root@localhost ~]# tree /opt/data/registry/repositories/
/opt/data/registry/repositories/
└── library
└── ssh
├── _index_images
├── json
├── tag_latest
└── taglatest_json
2 directories, 4 files
客户端
1.安装并启动docker
yum -y install docker
service docker start
chkconfig docker on
2.修改docker配置文件,指定私有仓库url
[root@localhost ~]# vim /etc/sysconfig/docker
修改此行
OPTIONS='--insecure-registry 192.168.0.167:5000 '
[root@localhost ~]# service docker restart
3.测试,下载刚才上传的镜像
[root@localhost ~]# docker pull 192.168.0.167:5000/busybox
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
192.168.0.167:5000/busybox latest 0064fda8c45d 5 days ago 1.113 MB
docker.io/registry latest 105c6c9299d9 5 days ago 423.3 MB
docker.io/centos latest ce20c473cd8a 6 days ago 172.3 MB
docker.io/atcol/docker-registry-ui latest d838355ad903 6 months ago 890.5 MB
更多Docker相关教程见以下内容:
Ubuntu 14.04安装Docker
在Ubuntu Trusty 14.04 (LTS) (64-bit)安装Docker