【问题标题】:Docker image prevents VM deploymentDocker 映像阻止 VM 部署
【发布时间】:2016-03-31 09:10:01
【问题描述】:

我中断了 mvn gcloud:deploy 命令并且无法重新部署,因为此错误消息不断出现。我已经从 GCS 中删除了所有自己生成的存储桶,但结果仍然没有不同。

[INFO] If this is your first deployment, this may take a while.../
[INFO]                                                            
[INFO] If this is your first deployment, this may take a while...done.
[INFO] 

[INFO] ERROR: (gcloud.preview.app.deploy) There is a Dockerfile in the current directory, 
and the runtime field in /target/appengine-staging/app.yaml is currently set to
[runtime: java]. To use your Dockerfile to build a custom runtime, set the runtime field 
in /target/appengine-staging/app.yaml to [runtime: custom]. To continue using the [java]
runtime, please omit the Dockerfile from this directory. 

[ERROR] Error: gcloud app command with exit code : 1

由于我怀疑这个“锁”是在 Google 的源文件中,它后来删除了一个构建器实例,所以我做了它所抱怨的事情,将我的运行时从 java 更改为 app.yaml 文件上的自定义并重新部署。

我无法再使用 Java 运行时部署我的 VM,我仍然收到相同的错误消息。如何执行干净的构建以摆脱这个幻影 docker 映像?

【问题讨论】:

  • 如果删除当前目录下的 Dockerfile 会发生什么?
  • 它有效。 Eclipse 没有刷新就向我展示它。
  • 睡眠不足引发的问题。

标签: java maven google-app-engine gcloud google-managed-vm


【解决方案1】:

要清理 maven 构建的目标目录,您可以这样做:

mvn clean gcloud:deploy

【讨论】:

  • 我没有在 Eclipse 上刷新 appengine-staging 文件夹以显示 Dockerfile,而是使用 gcloud 命令行工具获取信息。调试 deploy_command_util.py 以发现 Dockerfile 的路径就在我的眼皮底下:/target/appengine-staging。由于cloud.google.com/sdk/gcloud 不是开源的,我无法提供更直接的错误消息。可以选择清除任何以前的 docker 映像,但我相信 mvn clean gcloud:deploy 比阻止使用自定义 docker 映像更好。
猜你喜欢
  • 2019-05-06
  • 2018-11-12
  • 2018-08-24
  • 1970-01-01
  • 1970-01-01
  • 2015-04-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多