[RuntimeException]/var/www/vendor does not exist and could not be created


I was following the tutorial :

But when i try “docker-compose exec app composer install”. I have error :

[RuntimeException]/var/www/vendor does not exist and could not be created.

I try with sudo but doesn’t work. Any issue ?

thanks a lot

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Your docker host needs to have the same user and id as you specify in docker-compose.yml (docker-compose.yml#L6. Once you fix that, remove all containers and recreate them. This will fix the errors.

Hi @sylvainFish,

I can confirm I just followed the tutorial and managed to run the command you mentioned without a problem. Unfortunately, I can’t seem an exact reason behind the experienced issue. What I’ll recommend is just trying to follow the tutorial step by step from the beginning.

Regards, KFSys