docker pull registry:2
docker run -d --restart=always -p 5000:5000 --name myregistry -v /opt/registry:/var/lib/registry registry:2
docker pull hyper/docker-registry-web
docker inspect myregistry | grep IPAddress
docker run -d --restart=always -p 8000:8080 --name registry-web --link myregistry -e REGISTRY_URL=http://172.17.0.2:5000/v2 -e REGISTRY_NAME=192.168.16.101:5000 hyper/docker-registry-web
http://192.168.16.101:8000/
vim /usr/lib/systemd/system/docker.service
#添加如下参数
ExecStart=/usr/bin/dockerd --insecure-registry 192.168.16.101:5000
或者
vi/etc/docker/daemon.json
#添加如下参数
{ "insecure-registries":["192.168.1.100:5000"] }
systemctl daemon-reload
systemctl restart docker
docker tag nginx 192.168.16.101:5000/nginx
docker push 192.168.16.101:5000/nginx
vi /etc/docker/daemon.json
配置:
{
"insecure-registries":["192.168.16.101:5000"]
}
systemctl daemon-reload
systemctl restart docker
docker pull 192.168.16.101:5000/nginx