在本地运行演示失败:服务“消费者”无法构建
当在 GitHub存储库中描述了构建 API 平台演示的 Tring 时,构建似乎在 PHP 步骤上失败:
Step 28/36 : RUN set -eux; mkdir -p var/cache var/log; composer dump-autoload --classmap-authoritative --no-dev; composer run-script --no-dev post-install-cmd; chmod +x bin/console; sync
---> Running in 7c9b0eb0fd97
+ mkdir -p var/cache var/log
+ composer dump-autoload --classmap-authoritative --no-dev
Generating optimized autoload files (authoritative)
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
Generated optimized autoload files (authoritative) containing 4776 classes
+ composer run-script --no-dev post-install-cmd
Run composer recipes at any time to see the status of your Symfony recipes.
Executing script cache:clear [OK]
Executing script assets:install public [OK]
Executing script security-checker security:check [KO]
[KO]
Script security-checker security:check returned with error code 1
!!
!! The web service failed for an unknown reason (HTTP 403).
!!
!!
Script @auto-scripts was called via post-install-cmd
ERROR: Service 'consumer' failed to build: The command '/bin/sh -c set -eux; mkdir -p var/cache var/log; composer dump-autoload --classmap-authoritative --no-dev; composer run-script --no-dev post-install-cmd; chmod +x bin/console; sync' returned a non-zero code: 1
我尝试以下命令:
docker-compose build
我也打开了一个问题https://github.com/api-platform/demo/issues/192
回答
我认为服务停止了..
https://packagist.org/packages/sensiolabs/security-checker
改用这个
https://github.com/fabpot/local-php-security-checker