Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Laravel Sail after cloning from Git repository

I currently have my own Laravel application running on Docker using Laravel sail on Windows 11 using Ubuntu on WSL2. This works fine and as intended. I’ve pushed my work onto a Git repository, but how would I be able to pull this onto a new system? The vendor files that come with Laravel sail when you install won’t be sent to the repository, so sail will be useless until composer’s vendors files are installed.

I’m new to Docker, would this mean I would have to install composer and PHP on Linux (WSL2) and then install the vendor files? Is there any easier method to this, or is this the conventional way?

Thank you for any help.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I’ve handled this by using the composer docker image to install the dependencies.

Clone the repo and then run the following command from within the root directory.

docker run --rm --interactive --tty -v $(pwd):/app composer install

By mounting your repository into the container, the composer container will write the vendor directory and it will appear in your host.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading