試圖將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.