Potential bug I've encountered:
-
You've spun up a docker-machine VM using Virtualbox on OSX.
-
You've got a local app that you're doing local development with via docker-compose
-
You've got process that'll reload on changes to the files -- ./manage.py runserver, Flask's .run(debug=True), etc.
-
You make changes to files but they don't appear in the running container. Sometimes old content in the files continues to appear, even after a docker-compose stop/start.
Using docker-machine-nfs seems to fix the issue.
git clone https://github.com/cmheisel/docker-machine-fstest.git
cd docker-machine-fstest/
# Run test with default volume mounting from virtualbox
bash ./test.sh
# Optionally test it with NFS
bash ./test.sh nfs
- OS X El Capitan
- Virtualbox Version 5.0.16 r105871
- Docker version 1.10.3, build 20f81dd
- docker-compose version 1.6.2, build 4d72027
- docker-machine version 0.6.0, build e27fb87
- docker-machine-nfs Optional
Really weird results in bold
Distro/App | Changes appear on file change | Changes appear on container restart |
---|---|---|
Alpine/Flask | NO | NO |
Alpine/Nginx | NO | NO |
Debian/Flask | Yes | Yes |
Debian/Nginx | NO | NO |
# Without NFS
======> Checking for change w/out restart
======> Python Alpine: FAILED
======> Nginx Alpine: FAILED
======> Nginx Jessie: FAILED
======> Restarting containers
======> Checking for change with restart
======> Python Alpine: FAILED
======> Nginx Alpine: FAILED
======> Nginx Jessie: FAILED
======> CHANGED not found on one or more URLs
# With NFS
======> SUCCESS! NFS: 1