Adding bundle within Docker


I’m relatively new to Docker. I wanted to add a bundle, and it says Composer is not installed within the server but is within Docker. So, the question becomes, do I need to install Composer outside and run as usual or is there a way to execute the composer that was installed when the Docker Image was installed? Not sure how this works.


You can do both. From within the container or outside. I prefer to do it from within the container since composer wil check also php requirements.

You might need this flag --ignore-platform-reqs running composer outside the container.
Or fake the dependency in composer.json.

1 Like

Thanks for getting back to me.

OK. That answers that. Which brings in a new question. I prefer to run from within Docker. How do I pull that off? In CLI, there is no composer and I cannot see any way possible to run it.

Have a look at following article

For the demo docker container it would be:
docker exec -ti pimcore-demo-php /bin/bash

Afterwards you can run the composer command

1 Like

Exactly what I needed.

Thank you so much.

1 Like