Docker for Mac Issues¶
-dev-macos version of php image where default
wodby user has
501:20 uid/gid that matches default macOS user.
Poor volumes performance¶
There 2 ways how can improve performance of docker volumes on macOS:
Since Docker for Mac 17.06 there's a new
:cached option available for volumes. You can find more information about this in docker blog.
Replace codebase volume definition of php and nginx/apache services with the option below marked as "User-guided caching".
The core idea of this project is to use an external volume that will sync your files with a file synchronizer tool.
$ gem install docker-sync
docker-sync.ymlfile (inside of
docker4drupal.tar.gzarchive) from the latest stable release
- Uncomment docker-sync volume definition in your compose file
- Replace volumes definition of php and nginx/apache services with the option below marked as "Docker-sync".
- Start docker-sync:
- In a new shell run after you started docker-sync
docker-compose up -d
Now when you change your code on the host machine docker-sync will sync your data to php and nginx/apache containers.
For more information visit docker-sync project page.