Ask Your Question

Is it not possible to use composer with Docker container when using Laravel Sail?

asked 2021-06-21 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2023-04-02 11:00:00 +0000

ladyg gravatar image

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".

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer

Question Tools


Asked: 2021-06-21 11:00:00 +0000

Seen: 16 times

Last updated: Apr 02 '23