title: Symfony2 app slow response on MacOS & Boot2Docker
body: <p>I have a slightly big Symfony app, which I was running on Docker by adding all of the files in the Dockerfile, and run everything from within the container.  I was doing this only for testing purposes, but now I wanted to switch the dev environment to Docker as well, and tried using -v parameter to mount my local directory into the container using a command like this:</p>
  
  <p>docker run -v /Users/username/pathtofiles:/pathtofilesincontainer -i -p 80:80 -t tag sh /pathtofilesincontainer/init.sh</p>
  
  <p>This mounts the /Users/username/pathtofiles folder to /pathtofilesincontainer, and runs the init.sh successfully. init.sh is a basic shell script which doesn't have any impact on performance or anything.</p>
  
  <p>My ~/.profile file is set correctly and /etc/hosts file has a directive to point current.local to DOCKER_HOST ip.</p>
  
  <p>When I run the app by copying all of the files into the container via the ADD command in Dockerfile, it runs perfect ~0.5 to 1 sec response time. When I use the above command to mount the same files, it is extremely slow. Page is rendered around 25-35 seconds.</p>
  
  <p>I've searched other topics under SO, but none of them really helped me. I tried disabling xdebug, setting php_ini realcache settings to suggested values, running app/console cahce:clear command, trying to connect to a local mysql server, etc... Nothing worked.</p>
  
  <p>Anyone have any other ideas, or any suggestions? Thanks in advance!</p>
  
  <p>My stack is: Symfony2, MySQL, Apache2, Docker 1.3.0, boot2docker 1.3.0, VirtualBox</p>