gpt4 book ai didi

docker - 尝试运行 docker 镜像时,Google Cloud 找不到默认凭据

转载 作者:行者123 更新时间:2023-12-02 20:02:13 25 4
gpt4 key购买 nike

我正在尝试通过 Google Cloud 代理运行 Docker 镜像,尽管我尽了最大努力,Google Cloud 仍然给我这个错误:

Can't create logging client: google: could not find default credentials. See https://developers.google.com/accounts/docs/application-default-credentials for more information.



每当我尝试使用此命令运行我的 Docker 镜像时:
sudo docker run dc701c583cdb

我已尝试更新我的 GOOGLE_APPLICATION_CREDENTIALS环境变量到我的 key 文件的路径。
我已使用 gcloud auth application-default login 成功登录到 Google Cloud命令。
我已经在 Google Cloud 中定义并关联了我的项目。

我正在尝试这样做是为了运行一个开源项目。我很确定我正确地创建了 Docker 镜像。我感觉问题出在我没有正确地将现有项目连接到我的 Google Cloud 的事实。

任何建议将不胜感激。我正在使用 Docker 18.06.1-ce 和 Google Cloud-SDK 219.0.1。在带有 Ubuntu 18.04 的虚拟 linux 机器上运行。

最佳答案

运行 google/cloud-sdk 时在新创建的 Ubuntu 18.04 实例中来自 Docker Hub 的容器,该容器的 gcloud自动继承实例的用户配置。试一试:运行该容器,然后运行 ​​gcloud info在里面。

因此,我相信你可能做错了什么。我建议你看看the aforementioned container看看如何让它发挥作用。

关于docker - 尝试运行 docker 镜像时,Google Cloud 找不到默认凭据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52687230/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com