试图将Java应用程序部署到Google Appengine托管虚拟机。我正在使用控制台gcloud
并已准备好WAR文件。另外app.yaml。托管虚拟机部署失败,因为不支持“env”设置
使用以下命令:
gcloud preview app deploy ./build/libs/app.yaml
现在它失败:
Building and pushing image for module [default]
-------------------------------------------------------------------------------- DOCKER BUILD OUTPUT --------------------------------------------------------------------------------
Step 0 : FROM gcr.io/google_appengine/jetty9
---> 005014071b64
Step 1 : ADD webapp-webapp.war $JETTY_BASE/webapps/root.war
---> 3e9023930cc8
Removing intermediate container 342e8a2f5750
Successfully built 3e9023930cc8
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Beginning teardown of remote build environment (this may take a few seconds).
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [400] "env" setting is not supported for this deployment.
我看到类似的错误(there)为maven-gcloud-plugin
当项目未配置为战争发生。但请注意:
- 我使用纯命令行工具
gcloud
,最新版本 - 和我的项目被包装成WAR已经
而且我使用以下app.yaml
(我“VE从Maven插件渠道获得):
runtime: java
env: 2
api_version: 1
handlers:
- url: .*
script: dynamic
所以现在的问题,从这个错误中,其中从(泊坞窗图片即将在这一刻已经准备, 对?)。这是什么意思?以及如何解决这个问题?
更新 我注意到它对VM使用FROM gcr.io/google_appengine/jetty9
。但对于Appengine来说,它应该是FROM gcr.io/google_appengine/jetty9-compat
。我试图切换到爆炸应用程序而不是WAR,并且它开始使用正确的Docker基本映像。但还是失败:
Building and pushing image for module [default]
-------------------------------------------------------------------------------- DOCKER BUILD OUTPUT --------------------------------------------------------------------------------
Step 0 : FROM gcr.io/google_appengine/jetty9-compat
---> 2ad8572ef3d8
Step 1 : ADD . /app/
---> b10f4bc6718e
Removing intermediate container 8b149f4baf9c
Successfully built b10f4bc6718e
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Beginning teardown of remote build environment (this may take a few seconds).
Updating module [default]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [400] "env" setting is not supported for this deployment.