Closed hopewise closed 8 years ago
I've noticed that this error occurs only if I have an existing app
The default laravel application does not allow storage and cache directories to be configured. This is a common source of permissions errors. It is possible to subclass the application to configure these parameters.
The setup script attempts to
composer require reflexions/docker-laravel
and then update bootstrap/app.php
to use Reflexions\DockerLaravel\DockerApplication
It sounds like the first step failed, and the second step succeeded.
Could you try adding the composer dependency by hand? And confirm that the app is running laravel 5.x?
It may be necessary to remove the following from composer.json so you can run composer install, then add them back afterwards:
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
I tried to run from inside container:
root@e0a4fa7ef758:/var/www/laravel# composer require reflexions/docker-laravel
But here is what I got:
Using version ^1.0 for reflexions/docker-laravel
./composer.json has been updated
> php artisan clear-compiled
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package laravelcollective/html == 5.2.4.0 could not be found.
Problem 2
- Conclusion: remove laravel/framework v5.2.14
- Conclusion: don't install laravel/framework v5.2.14
- laravelcollective/html v5.1.0 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.6, v5.1.8].
- laravelcollective/html v5.1.1 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.6, v5.1.8].
- laravelcollective/html v5.1.2 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.6, v5.1.8].
- laravelcollective/html v5.1.3 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.6, v5.1.8].
- laravelcollective/html v5.1.4 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.6, v5.1.8].
- laravelcollective/html v5.1.5 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.6, v5.1.8].
- laravelcollective/html v5.1.6 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.6, v5.1.8].
- laravelcollective/html v5.1.7 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.6, v5.1.8].
- laravelcollective/html v5.1.8 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.6, v5.1.8].
- laravelcollective/html v5.1.9 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.6, v5.1.8].
- don't install illuminate/session v5.1.1|don't install laravel/framework v5.2.14
- don't install illuminate/session v5.1.13|don't install laravel/framework v5.2.14
- don't install illuminate/session v5.1.16|don't install laravel/framework v5.2.14
- don't install illuminate/session v5.1.2|don't install laravel/framework v5.2.14
- don't install illuminate/session v5.1.20|don't install laravel/framework v5.2.14
- don't install illuminate/session v5.1.22|don't install laravel/framework v5.2.14
- don't install illuminate/session v5.1.25|don't install laravel/framework v5.2.14
- don't install illuminate/session v5.1.28|don't install laravel/framework v5.2.14
- don't install illuminate/session v5.1.6|don't install laravel/framework v5.2.14
- don't install illuminate/session v5.1.8|don't install laravel/framework v5.2.14
- Installation request for laravel/framework == 5.2.14.0 -> satisfiable by laravel/framework[v5.2.14].
- Installation request for laravelcollective/html 5.1.* -> satisfiable by laravelcollective/html[v5.1.0, v5.1.1, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9].
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
root@e0a4fa7ef758:/var/www/laravel#
then, I have manually copied the reflexions folder into the vendors folder, Although I have "reflexions/docker-laravel": "^1.0" in the composer.json at "require", but it I've got:
root@e0a4fa7ef758:/var/www/laravel# php artisan serve
PHP Fatal error: Class 'Reflexions\DockerLaravel\DockerApplication' not found in /var/www/laravel/bootstrap/app.php on line 14
The only way it worked for me is set $app as:
$app = new Illuminate\Foundation\Application(
realpath(__DIR__.'/../')
);
So, what do you advice please?
Reverting app back to Illuminate\Foundation\Application
should run. Will look into the laravel dependency on the reflexions/docker-laravel package.
if Reverting app back to Illuminate\Foundation\Application should run, then can you please explain what does reflexions/docker-laravel do? Also, how would I debug my app using xdebug??
On Tue, Feb 16, 2016 at 2:55 PM, Patrick Way notifications@github.com wrote:
Reverting app back to Illuminate\Foundation\Application should run. Will look into the laravel dependency on the reflexions/docker-laravel package.
— Reply to this email directly or view it on GitHub https://github.com/reflexions/docker-laravel/issues/5#issuecomment-184670684 .
Samir Sabri Software Architect& Developer www.dcaclab.com Jordan-Middle East
The only difference btw the two application classes is the relocation of cache files to /var/run/application
reflexions/docker-laravel
provides Reflexions\DockerLaravel\DockerApplication
There can be permissions issues with the volume share btw your local source directory and the docker container. Often these are triggered by running artisan inside and outside of the container. The affected paths are usually laravel's storage and cache files.
Regarding xdebug, extending the Dockerfile allows customization of php extensions.
Thanks patsplat
Hello,
Thank you for this great image, however, I got error:
I could not add a key for all, I try
php artisan key:generate
I get the above errorIf I try to run composer install, I got:
Please advice