在coreos上使用gcloud docker客户端

我可以在coreos上使用'gcloud docker'客户端吗? 我想拉一个容器,但是当我做

gclouddocker拉

我明白了

WARNING: 'docker' was not discovered on the path. Credentials have been stored, but are not guaranteed to work with the 1.11 Docker client ifan external credential store is configured. 

我可以安装一个完整的gcloud客户端吗? 无论如何,gcloud在哪里? 我可以运行它,但which gcloud回来空手。

你必须使用这个命令:

$ docker login -e 1234@5678.com -u _token -p "$(gcloud auth print-access-token)" https://gcr.io

您也可以将https://gcr.io更改为: https://us.gcr.iohttps://us.gcr.io如果您的图片存储在其他地方。

如果这不起作用,请尝试JSON密钥文件方法,它更可靠。

docker login -e 1234@5678.com -u _json_key -p "$(cat keyfile.json)" https://gcr.io

这里也有logging:

https://cloud.google.com/container-registry/docs/advanced-authentication