DEV Community

Discussion on: Speed up Laravel in Docker by moving vendor directory

Collapse
cavo789 profile image
Christophe Avonture

Oh? I think I've said the same... (I was on my smartphone, probably not the best to write a comment).

I'm putting my ~/vendor folder only in the container; not on my host (in my case, Windows). I'm running docker-composer myapp composer update in my container and I've created an internal volume to map the vendor folder so stay in the container and is not synchronized on my host.

My question was: why put you the folder not in the application directory but somewhere (so you've forced to update the ~/public/index.php file). Using an internal volume achieve the same result without the need to hack some Laravel file like index.php.

For OpCache, yes, I've just played right now with it and the improvement is really nice (github.com/cavo789/docker_php_opcache), about 30% faster.

Thread Thread
tylerlwsmith profile image
Tyler Smith Author

Can you give me an example of what you have in mind? I don't think I understand what you're trying to do.