Closed infracritical closed 1 year ago
You need to make sure that all volumes (including the .env file) are readable and writeable by the container.
@infracritical I had the same issue. When I exec into the container and looked at the .env file its owned by root:root. I assumed the application user did not have permissions to write against that file. This is what I did to continue the installation:
docker compose exec --user root app sh chown application:application .env exit docker compose exec --user application app sh php artisan install
Is this issue resolved - thanks to @krylon ? If so please close this issue.
Installed the most recent version. RTFM'd as per instructions for 'docker-compose'. Got this error message 'dump':
/var/www $ php artisan install Initiate installation...
0/4 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0%
ErrorException
file_put_contents(/var/www/.env): Failed to open stream: Permission denied
at vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php:96 92▕ { 93▕ file_put_contents($this->laravel->environmentFilePath(), preg_replace( 94▕ $this->keyReplacementPattern(), 95▕ 'APP_KEY='.$key, ➜ 96▕ file_get_contents($this->laravel->environmentFilePath()) 97▕ )); 98▕ } 99▕ 100▕ /**
14 app/Console/Commands/InstallCommand.php:47 Illuminate\Console\Command::call("key:generate")
28 artisan:37 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))