如何解决无法使用gcloud构建和提交
对于使用Docker部署gcloud的快速入门指南,我越来越感到沮丧:
https://cloud.google.com/cloud-build/docs/quickstart-build
我正在遵循每个步骤,但是无法使用命令进行构建:
gcloud builds submit --tag gcr.io/strange-vortex-286312/quickstart-image
如果我列出我的项目,这就是我所看到的:
本教程说,然后我使用PROJECT_ID并将其放入上面列出的命令中:
好的,很好。因此,我完全按照本教程中的说明进行操作,然后运行此命令>
gcloud builds submit --tag gcr.io/strange-vortex-286312/quickstart-image
但随后出现此错误:
FETCHSOURCE
Fetching storage object: gs://strange-vortex-286312_cloudbuild/source/1597335850.83144-c6bf33c39ca54474a15cf04835a07444.tgz#1597335851899497
Copying gs://strange-vortex-286312_cloudbuild/source/1597335850.83144-c6bf33c39ca54474a15cf04835a07444.tgz#1597335851899497...
/ [1 files][ 263.0 B/ 263.0 B]
Operation completed over 1 objects/263.0 B.
BUILD
Already have image (with digest): gcr.io/cloud-builders/docker
***** NOTICE *****
Alternative official `docker` images,including multiple versions across
multiple platforms,are maintained by the Docker Team. For details,please
visit https://hub.docker.com/_/docker.
***** END OF NOTICE *****
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /workspace/Dockerfile: no such file or directory
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1
----------------------------------------------------------------------------------------------------------------------------------------
ERROR: (gcloud.builds.submit) build 9c7c268f-07f3-486e-842f-8c1a0e2877ae completed with status "FAILURE"
我不确定此错误消息试图告诉我什么。
如果我进入控制台,则会看到此错误:
我也不确定此错误试图告诉我什么。
解决方法
好。就我而言,Dockerfile的名称不正确。
我有..
DockerFile
..不是
Dockerfile
大写字母F是问题所在。我花了很长时间才弄清楚这一点,因为DockerFile可在普通Docker中工作,所以我不认为大小写有问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。