Skip to content

Testing the behavior of docker-machine filesystem drivers

Notifications You must be signed in to change notification settings

cmheisel/docker-machine-fstest

Repository files navigation

Files not changing on docker-machine virtualbox instances?

Potential bug I've encountered:

  1. You've spun up a docker-machine VM using Virtualbox on OSX.

  2. You've got a local app that you're doing local development with via docker-compose

  3. You've got process that'll reload on changes to the files -- ./manage.py runserver, Flask's .run(debug=True), etc.

  4. 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.

Workaround

Using docker-machine-nfs seems to fix the issue.

Usage

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

Requirements

My Results

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

About

Testing the behavior of docker-machine filesystem drivers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published