deploying
1 makedir /opt/docker-registry
2 cd /opt/docker-registry
3 git clone https://github.com/docker/docker-registry.git
4 使用yum 安装../docker-registry/requirements中main.txt中指定的依赖包
5 运行python set.py install安装docker-registy
6 运行dokcer-registry
启动docker deamon
[root@localhost ~]# vi /etc/sysconfig/docker在OPTIONS中增加--insecure-registry 192.168.1.9:5000
OPTIONS= --insecure-registry 192.168.1.9:5000 --selinux-enabled -H fd://
Q: 启动docker-registry时遇到包backports.lazm包找不到,但实际是包已完成安装。定位发现是在lib和lib64目录下都有python-sitepackages,且都包含backports目录,从而导致python在搜索包的时候查找错误。
A:猜想是使用yum和pip混合安装导致的问题,卸载掉所以已安装包,重新使用yum安装问题解决。
Q:[root@localhost ~]# docker pull 192.168.1.9:5000/ubuntu
2015/02/01 04:05:48 Error: Invalid registry endpoint https://192.168.1.9:5000/v1/: Get https://192.168.1.9:5000/v1/_ping: EOF. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 192.168.1.9:5000` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/192.168.1.9:5000/ca.crt
A:在 /etc/sysconfig/docke中增加--insecure-registry 192.168.1.9:5000 解决此问题。
问提3:
Q:docker search 报错
A:没有配置search backend
问提4:
Q:无法删除镜像
A:需要先停止所以得container,然后在执行删除镜像