Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tekrda's avatar

Pulling laravel project to my computer with no local php and composer installed

I'm using docker for my local development on window 10. I've a folder on my local computer to manage and store codebase and other configuration files which in turn need to be mapped onto web root of the server running inside the docker. but the problem is that when i try to pull my laravel project using composer on my local machine, it gives error (composer not found) because there is no php and composer installed on my local machine. so, my question is:

  1. should i need to install php and composer on my local machine? it is a kind of running / managing php on local machine as well, I want to run my all-development stacks as the docker image only.
  2. or is there any way to use or refer the same php/composer which is running inside the docker to pull the codebase on my local computer?
  3. or is there other solutions around? please suggest, thanking you all!!
0 likes
3 replies
Sinnbeck's avatar

What do you mean by pulling the project with composer? Did you mean git?

tekrda's avatar

@Sinnbeck i use docker to run or test my php application on my window 10 machine. As we know that docker is a kind of virtualization where all the software stacks images (including laravel code) are available to run your App. i work with the code on my local computer where sometimes i need to use composer to pull laravel code or packages and when I'm done then I create docker image to get the app run. problem here is that on my local computer there is no php / composer installed. so, i want to use php-composer on my local composer without installing separately on my local computer. i want to refer php exe running inside docker from my local computer.

Sinnbeck's avatar

But if we are just talking about installing dependencies

docker run --rm --interactive --tty \
  --volume $PWD:/app \
  --user $(id -u):$(id -g) \
  composer install

Please or to participate in this conversation.