
This allows you to edit any files in your editor, they are synced into the volume and your app can access it. your file system), docker-sync implements different tools which take care of syncing the inside of the container with your host file system. As volumes are usually not bound to the outside world (i.e.

It creates a volume that holds all your app source files and makes it available to your app, which can read and write pretty fast to the volume. And this is exactly what docker-sync does.

Thankfully, Docker is able to use native mounting if you put files into volumes, which are then handled by the Linux kernel. Even a millisecond difference can pile up to half a second for your whole app, if you have a 500 source files which need to be read. While this does not sound like a big deal, it really is. In case of macOS, OSXFS is the elephant in the room. On Linux, Docker can directly mount files and folders from file system, while on Mac Docker has to pass the request to the OS which takes care of writing the file to the disk. The Docker for Mac (and for Windows) performance problems have their roots in the OS file system layer between Docker and OS. Thankfully, there is a solution for this problem, that does not require changing your whole tech stack: docker-sync. Response times of a second for Laravel apps and 3-7 seconds for a larger Wordpress stack are quite common. But there is and always was one problem: performance. I haven’t touched my MAMP dev setup for more than a year now and barely use my local PHP CLI.

I really do love the concept of Docker and containerization.
