I want to connect my terminal to sail for running commands and edit files in sail containers.
I found that I can execute php artisan commands like:
sail artisan migrate replacing php to sail.
But I want to get into: /var/www/project in container to execute php artisan migrate
What aliases exists for this?
You can use sail shell as sail user or sail root-shell as root user. Then you can run any command inside the container.
In order to run php artisan commands just use sail shell then run your commands. However, remember sail artisan commands is always there for you.
source: https://laravel.com/docs/10.x/sail#sail-container-cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With