Docker for mac vs dinghy

broken image
broken image

TLDR: The problem is File-Syncing (very slow), get rid of volumes where possible. 300ms in total for very easy actions/controllers. We're now down to ~100ms of symfony debug tool-bar time. Our ngnix uses volumes (had no more time for more dev-ops) for the static file serving like css/js and so on, but only with the mode :ro (read-only at the end of the volume definition).We use volumes for: DoctrineMigrations directory (generated from the container, edited by the developer on the host-system with IDE), translations directory (gets downloaded by the container, should be visible to IDE for developer, could be switched to one-way-sync from container to host).If you can define a master for the data, use rsync instead of a volume (for example the vendors dir, but be aware that you then have to install the vendors from your host, not very cool because you could use a wrong php-version or not the same extensions and so on).Remove every Volume and try to find out what really needs to be synced.Also the amount of shared files is important/makes a difference. If you for example have a ngnix and a php-fpm container and they both use same volume-paths its really fucked up, because every read/write operation has to be synced with the host and also with the other container. Every Volume you sync with a container slows down the whole stack.