@ahmadreza1383 I have absolutely no idea what problem youāre trying to solve here? If someoneās using Sail then they wouldnāt be installing Composer and PHP on their machine in the first place. The entire point of using a containerised solution like Sail, is that you run PHP commands inside a container: https://laravel.com/docs/sail#executing-php-commands
The EasySail repo for simplifying working with Sail.
Hey Laravel community! š
Iāve been working on a new package called EasySail: github.com/karbordia/easysail
The goal of this package is twofold:
- Provide a reliable source of pre-built Laravel Sail images so you donāt have to rebuild them every time.
- Eliminate extra dependencies like installing Composer or PHP on your host machine.
Eventually, Iām planning to add a CLI tool to make working with Sail even easier. Imagine something like:
- Creating a new project:
apt install easysail
easysail new example-app --sail=8.4
- Or working with an existing project:
easysail -p ./example-app --sail=8.4
Iād love to hear your thoughts, feedback, or any suggestions on this approach!
UPDATE:
Thanks for the feedback everyone.
I think thereās no need to build a CLI tool anymore.
But Iāll keep this repo to have the Sail images ready, so anyone who needs them can just download and use them anytime(Especially for Iran)
I'm sure the docs used to mention it somewhere, but if you're going for a containerised approach, you'd run composer in a container too, eg:
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
composer/composer:latest \
composer req laravel/sail --dev
I haven't installed PHP locally for nearly a decade.. and on the 2 occassions I needed to use Sail, it installed just fine running composer in a container.
While I commend you on looking into writing a package... it's ultimately a solution looking for a problem.
Please or to participate in this conversation.