使用gcloud app deploy
进行部署时,我刚刚开始收到此错误消息,导致部署失败。
我的yaml
文件确实定义了runtime_config: document_root
,并且之前我已经成功部署了无数次。
这是我看到的错误消息:
步骤1:摘要:...
步骤1:状态:已下载更新的图像 gcr.io/gcp-runtimes/php/gen-dockerfile@sha256:26c300e0afd68577f9bd3f2565bd690379ed797b74eed8517cc93e86f2c1be5a 步骤#1:gcr.io/gcp-runtimes/php/gen-dockerfile@sha256:26c300e0afd68577f9bd3f2565bd690379ed797b74eed8517cc93e86f2c1be5a 步骤#1:+ php /builder/create_dockerfile.php create --php72-image gcr.io/google-appengine/php72@sha256:6255560e92bfff2d4debc198156bdbeeefccf97b4f315c84c5e6bc03387dc6f7 --php71-image gcr.io/google-appengine/php71@sha256:ea560b34d5da1e51aca89373ee90e2c67637fd141914d582753927e9d05f5d11 --php70-image gcr.io/google-appengine/php70@sha256:84b209e24bf340e3afbadde366ddb6c20d6879fe513bf600fc5a440767363917 --php56-image gcr.io/google-appengine/php56@sha256:8cd9595ab8672c906c029d58276ec5547d34e2781e278f6af0715ca8ac15bab1
步骤1:步骤1:在GenFilesCommand.php中,第297行:步骤1:
步骤#1:您必须在runtime_config部分中设置document_root 在app.yaml中。步骤#1:
步骤#1:步骤#1:创建[--php72-image PHP72-IMAGE] [--php71-image PHP71-IMAGE] [--php70-image PHP70-IMAGE] [--php56-image PHP56-IMAGE] [-w | --workspace WORKSPACE]步骤1:完成步骤1错误错误: 建立步骤1 “ gcr.io/gcp-runtimes/php/gen-dockerfile @ ...”失败:退出状态1
更新服务[...](这可能要花费几分钟)...失败。
错误:(gcloud.app.deploy)错误响应:[9]云构建 ...状态:失败。
生成错误详细信息:生成错误详细信息不可用。
我的 yaml 配置的内容
runtime: php
runtime_config:
document_root: wordpress
nginx_conf_include: nginx-app.conf
env: flex
api_version: 1
service: SERVICE_ID
threadsafe: true
automatic_scaling:
min_num_instances: 1
max_num_instances: 10
resources:
cpu: 4
memory_gb: 12
disk_size_gb: 10
beta_settings:
cloud_sql_instances: REDACTED
handlers:
- url: /(.*\.(htm|html|css|js|scss|map))
static_files: wordpress/\1
upload: wordpress/.*\.(htm|html|css|js|scss|map)$
application_readable: true
secure: always
- url: /(.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg))
static_files: wordpress/\1
upload: wordpress/.*\.(ico|jpg|jpeg|png|gif|woff|ttf|otf|eot|svg)$
application_readable: true
secure: always
- url: /(.*\.php)
script: wordpress/index.php
secure: always
skip_files:
- ^.sass-cache
- ^.git
- ^.log
- .sass-cache/
- .git/
- ^vendor
- ^node_modules
- ^wonolog
env_variables:
WHITELIST_FUNCTIONS: escapeshellarg,escapeshellcmd,exec,pclose,popen,shell_exec,phpversion,php_uname