Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No, that's not correct. Laravel Sail includes Composer by default, so you can use Composer commands inside the Docker container without any additional setup.

Here's an example of how you can use Composer inside the Laravel Sail Docker container:

  1. Open your terminal and navigate to your Laravel project directory.
  2. Start the Docker container with the sail command: ./vendor/bin/sail up
  3. Once the container is running, you can execute Composer commands inside the container by prefixing them with sail like this: ./vendor/bin/sail composer update

This will execute the Composer update command inside the Docker container, and update all your dependencies.

So, the short answer is "Yes, it is possible to use Composer with Docker container when using Laravel Sail".