docker run -d -p 5000 -v /tmp/registry:/tmp/registry --name="docker-registry" registry
docker push <docker-registry-ip>:5000/ubuntu
导致错误:FATA[0000] Error: v1 ping attempt failed with error: Get http://<docker-registry-ip>:5000/v1/_ping: dial tcp <docker-registry-ip>:5000: connection refused
我已经向/etc/default/docker添加了以下内容,并重新启动了docker服务DOCKER_OPTS="$DOCKER_OPTS --insecure-registry=<docker-registry-ip>:5000"
发布于 2015-04-09 06:09:26
您未在主机上绑定端口。当您只提到-p 5000时,它用于容器端口,并绑定到主机上的随机端口。您需要运行以下命令:
docker run -d -p 5000:5000 -v /tmp/registry:/tmp/registry --name="docker-registry" registry另外,别忘了在推送之前先给图片加上标签:
docker tag Ubuntu <docker-registry-ip>:5000/ubuntuhttps://stackoverflow.com/questions/28587901
复制相似问题