Laravel 5.2 – Artisan Optimize – 找不到类TestMakeCommand

我在docker / w共享代码卷上运行我的本地环境。 当我的Dockerfile运行php artisan optimize失败…

 Step 14/15 : RUN composer install && composer update ---> Running in 94698cafb7bf Do not run Composer as root/super user! See https://getcomposer.org/root for details Loading composer repositories with package information Installing dependencies (including require-dev) from lock file Package operations: 0 installs, 2 updates, 0 removals - Updating aws/aws-sdk-php (3.30.0 => 3.30.2): Downloading (100%) - Updating barryvdh/laravel-ide-helper (v2.3.2 => v2.4.0): Downloading (100%) Generating autoload files > Illuminate\Foundation\ComposerScripts::postInstall > php artisan optimize [Symfony\Component\Debug\Exception\FatalThrowableError] Class 'Illuminate\Foundation\Console\TestMakeCommand' not found Script php artisan optimize handling the post-install-cmd event returned with error code 1 

但是,我运行本地php artisan optimize它工作正常,如果我从composer.json删除它将build立罚款,我可以在容器上运行它没有问题,我不明白为什么它不会有什么区别,build造容器时运行?