

I made several tests to get a faster environment, and I got an interesting solution.įirst, I moved the cache and logs dir to a non-shared directory, you can see the changes here. However the “dev” mode is required when developing a Symfony app, which is quite… obvious. The Symfony app is run in “dev” mode on the example I provided, which is much slower than the production mode. You are right, on my machine the first call is about 18 seconds, and the next ones are about 4 seconds, just slightly slower than on your machine. Using the default structure (without moving these dirs outside shared directories) would however be a great way to make tests and improve Docker performance.

TL DR Speed can be much improved by moving cache / logs and especially vendor dirs out of shared directories. Running the same app within a container that doesn’t share folders with the host takes about 20ms! On my end-2013 mac (running OS X 10.11.4, with Docker 1.11.1-beta10 (build: 6662)), the page takes 18 seconds to load! An entry point that installs the PHP dependencies for Symfony (aka.Build an image with the necessary PHP configuration for Symfony (install Composer, etc.).I have created a simple repository with a simple Symfony install.
