Docker: /var/www/vendor does not exist and could not be created
cyrixSpec opened this issue · 5 comments
First of all,
thank you all for this great peace of software.
I installed the docker continer with this instruction
https://docs.craterapp.com/installation.html#docker-installation
On my mac its works, on the sever it does not.
I get the following message
**server** /workspace/crater # ./docker-compose/setup.sh
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 167 installs, 0 updates, 0 removals
In Filesystem.php line 254:
/var/www/vendor does not exist and could not be created.
install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
Warning: require(/var/www/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/artisan on line 18
Fatal error: Uncaught Error: Failed opening required '/var/www/vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/artisan:18
Stack trace:
#0 {main}
thrown in /var/www/artisan on line 18
Warning: require(/var/www/vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/artisan on line 18
Fatal error: Uncaught Error: Failed opening required '/var/www/vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/www/artisan:18
Stack trace:
#0 {main}
thrown in /var/www/artisan on line 18
What can I do?
The solution is posted here somewhere, but here you go...
You need to set permissions for the whole Crater folder, like this: # sudo chown -R 1000:1000 crater/
@telmob Brillian! Who could think that the docker-compose directory should be owned by 1000! While installing by root and and not being able to access the directory!
Is there any workaround for not using sudo chown -R 1000:1000 crater/
?
This is really lame
I tried to use sail
but I became unable to connect to MySQL (I will try to open a dedicated issue for sail
)
The solution is posted here somewhere, but here you go...
You need to set permissions for the whole Crater folder, like this: # sudo chown -R 1000:1000 crater/
I would say that instead of being posted "somewhere", the solution should be posted as the first command here: https://docs.craterapp.com/installation.html#step-4-run-below-commands
seeing as it is pretty critical to the outcome of that whole page.