To fix Docker poor performance on macOS (OS X) use the following workaround based on docker-sync project. The core idea is to replace a standard slow volume with a file synchronizer tool like unison (used by default) or rsync.
gem install docker-sync brew install fswatch
- Uncomment d4d-unison-sync volume definition in your compose file
- Replace volume for php container to d4d-unison-sync (uncomment and delete the current one)
- Start the synchronization with
docker-sync startand let docker-sync run in the background
- In a new shell run after you started docker-sync
docker-compose up -d
Alternatively to docker-sync start you can do it all in one step
docker-sync-stack start to start sync services and docker-compose at the same time
Now when you change your code and it will all end up in php and nginx containers.
For more information visit docker-sync project page.