【发布时间】:2021-03-26 22:26:16
【问题描述】:
我通常将我的 NodeJS 应用部署到 Google App Engine,并在通过 .gcloudignore 文件部署时忽略所有 docker 资产,如下所示:
.git
.gitignore
Dockerfile
docker-compose.yml
nginx/
redis-data/
.vscode/
.DS_Store
.prettierrc
README.md
node_modules/
.env
上周我已成功将我的应用部署到 App Engine,没有任何问题。但是今天(除了源代码没有任何更改)它失败并给我一个错误:
ERROR: (gcloud.app.deploy) There is a Dockerfile in the current directory, and the runtime field in /Users/tranphongbb/Works/unstatic/habitify-annual-report-backend/app.yaml is currently set to [runtime: nodejs]. To use your Dockerfile to build a custom runtime, set the runtime field to [runtime: custom]. To continue using the [nodejs] runtime, please remove the Dockerfile from this directory.
即使删除.gcloudignore 文件并使用app.yaml 中的skip_files 选项,它仍然失败。
我的源代码树:
.dockerignore
.eslintrc.json
.gcloudignore
.gitignore
.prettierrc
.vscode
Dockerfile
README.md
app.yaml
docker-compose.yml
nginx
package.json
src
【问题讨论】:
标签: node.js docker google-app-engine gcloud