我对google container registry和dockerhub有一个问题,docker pull返回以下错误。
gcr
错误:状态403试图提取存储库PROJECT_ID/IMAGE_NAME:“无法访问存储库: PROJECT_ID/IMAGE_NAME;请验证它是否存在,并且您有访问它的权限(没有提供有效的凭据)。”
码头枢纽
使用默认标签:最新测试-节点0:拉动k8tems/hello-world:最新.错误:图像k8tems/hello-world未找到错误:图像k8tems/hello-世界未找到
只有当停靠者指向一群人时才会发生这种情况。
复制步骤:
DOCKER_REGISTRY=asia.gcr.io/$PROJECT_ID
KEY_STORE=test-keystore
NODE_BASE=test-node
echo pushing hello-world image to gcr
docker pull hello-world
docker tag hello-world $DOCKER_REGISTRY/hello-world
docker push $DOCKER_REGISTRY/hello-world
echo setting up key store
docker-machine create \
-d digitalocean \
"$KEY_STORE"
docker $(docker-machine config "$KEY_STORE") run -d \
-p "8500:8500" \
-h "consul" \
progrium/consul -server -bootstrap
eval $(docker-machine env "$KEY_STORE")
docker-machine create \
-d digitalocean \
--swarm \
--swarm-master \
--swarm-discovery="consul://$(docker-machine ip "$KEY_STORE"):8500" \
--engine-opt="cluster-store=consul://$(docker-machine ip "$KEY_STORE"):8500" \
--engine-opt="cluster-advertise=eth0:2376" \
"$NODE_BASE"0
echo this fails
eval $(docker-machine env -swarm "$NODE_BASE"0)
docker pull $DOCKER_REGISTRY/hello-world
echo this succeeds
eval $(docker-machine env "$NODE_BASE"0)
docker pull $DOCKER_REGISTRY/hello-world除了上面的片段之外,我还尝试过将远程对接版本强制转换为1.10.3,并强制群集到1.1.3,但是错误仍然存在。
ubuntu:~$ docker-machine ls | grep test
test-keystore - digitalocean Running tcp://:2376 v1.10.3
test-node0 * digitalocean Running tcp://:2376 test-node0 (master) v1.10.3
ubuntu:~$ docker exec swarm-agent-master /swarm -v
swarm version 1.1.3 (7e9c6bd)
ubuntu:~$ docker -v
Docker version 1.10.2, build c3959b1在使用-swarm标志时,我能做些什么吗?还是必须为每个节点运行pull命令?
发布于 2016-05-09 17:35:52
试试JSON密钥文件!这是一个长期存在的凭证,当您使用群集或kubernetes这样的集群时,它比访问令牌更加一致。
示例命令: docker登录-e 1234@5678.com -u _json_key -p "$(cat keyfile.json)“https://gcr.io
下面是包含更多详细信息的页面:file
https://stackoverflow.com/questions/37117434
复制相似问题