gcloud运行部署错误:(gcloud.run.deploy)[来源]:指定时需要dockerfile的值

发布于 2025-02-11 04:22:35 字数 405 浏览 1 评论 0原文

我试图通过在博客上进行以下说明(作者:将Nestjs应用程序部署到使用GitHub Actions运行)。

在“使用gcloud run部署”部分中,当给出命令gcloud run deploy时,我收到了此不清楚的错误消息:

Deployment failed
ERROR: (gcloud.run.deploy) Invalid value for [source]: Dockerfile required when specifying --tag

I was trying to deploy to CloudRun for the first time by following instruction on a blog (By Tom Ray : Deploying a NestJS app to Cloud Run with Github Actions).

In the section "Use gcloud run deploy", when giving the command gcloud run deploy I got this unclear error message:

Deployment failed
ERROR: (gcloud.run.deploy) Invalid value for [source]: Dockerfile required when specifying --tag

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自由范儿 2025-02-18 04:22:35

搜索网络我找不到答案或提示来解释错误消息。

转到另一个教程后,我了解了我的错误。

这是一个简单的“案例敏感”语法错误命名Docker文件的命名。

我将其命名为“ Dockerfile”,它应该被命名为“ Dockerfile”。

这是项目中所有其他文件名中的独特命名约定,它们都是小写或所有大写。

一条更好的错误消息将是“错误:丢失Dockerfile”,这足以让我找到原因。

Searching the web I could not find an answer or hint to explain the error message.

After moving on to another tutorial I understood what my mistake was.

It was a simple "case sensitive" syntax error naming of the docker file.

I named it "dockerfile" and it should have been named "Dockerfile".

This is a unique naming convention from all the other filenames in the project, they are either all lowercase or all uppercase.

A better error message would have been "ERROR: Missing Dockerfile", that would have been enough for me to find the cause.

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文