This answer can help https://stackoverflow.com/a/42934196/2110663
Check your composer.json
file for occurencies app/AppKernel.php, and check your file structrue to be sure that you have this file in path.
In my case i had next part in composer.json (see classmap)
...
"autoload": {
"psr-4": {
"AppBundle\\": "src/AppBundle",
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
...
I tried to build dockerfile and cache at first vendors without code dependency. So
My dockerfile looks next
...
ADD composer.json .
ADD composer.lock .
RUN composer install
...
In this case filesystem does not contain app/AppKernel.php file, but composer.json file required for it.
To resolve this issue we have 2 options:
- Update
composer.json
and remove from it mentions of problematic files
- Add files, or check its existence in file-system
My solution was to add absent files before running composer install
. Updated Dockerfile looks next:
ADD composer.json .
ADD composer.lock .
# Fix composer install issue with adding 2 lines below
ADD app/AppKernel.php app/
ADD app/AppCache.php app/
RUN composer install
Hope this hint might helps for somebody else