Best practice to run artisan commands with docker?
I'm moving to dockerized development and wonder what is a good way of running artisan commands?
I see 2 ways which I don't really like:
- exec to container
- install php on the host and run there
If you can't SSH into the server then you can create an alias for it in your bash_profile or bashrc
alias dmm='docker-compose exec app php artisan make:controller'
so
docker-compose exec app php artisan make:controller MyController
Would become
dmm MyController
Please or to participate in this conversation.