Home > Net >  Laravel Sail Paradox - There are any way to install without php and composer installed?
Laravel Sail Paradox - There are any way to install without php and composer installed?

Time:02-24

Laravel Sail, has a good premisse to create a zero dependency environment, with, php, redis, mariadb etc...

But its instalation require composer, composer require php installed,

is this a paradox?

There are some way to achieve zero dependency, with docker installed?

CodePudding user response:

As Sail give you the option to manage the container from the host through Artisan, then no.

If you don't mind to give up the ability to use Sail in this way and just want to set up a dockerized environment for Laravel, then yes. You can make a container for php in which you copy your project and through volumes maps to the host. You can enter a container (as if using ssh) through docker-compose exec <service> <command>, in the repo I linked, the php Dockerfile uses Alpine as the linux distro, which comes with the ash (instead of bash) shell. Because of his you can run

docker-compose exec php ash

to enter the container and run commands inside it.

  • Related