Adjust for current versions.
Laravel Sail set up when no php on host machine
Hi I'm trying to get Laravel Sail up and running on a new project to play around with docker as a development environment. I have docker installed and following the guidance installed a new project.
In the guidance it says to run php artisan sail:install
I don't have PHP installed on my ubuntu host machine so unable to run this command directly from the host machine.
I found some answers here which suggest to use a docker image to install the dependencies: https://laracasts.com/discuss/channels/laravel/sail-containers-on-a-computer-with-no-local-php-composer-installed I've run this command:
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/opt \
-w /opt \
laravelsail/php82-composer:latest \
php artisan sail:install
However this then generates an error:
In PhpFileParser.php line 51:
File at "/var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/B
ootstrap/RegisterProviders.php" does not exist, check your classmap definit
ions
So:
- How to initialise Sail without PHP installed on the host machine - to then run sail in a docker container
- If what i've done so far is the correct approach how do I overcome the error
Sail is complaining there is no configuration file if i try ./vendor/bin/sail up
Thank you
Please or to participate in this conversation.