Modifying filesystem from host

I don’t think this is a bug report, I think it is a request for a “Docker for Mac for Dummies” guide. Help finding what I’ve missed would be great!

Maybe this isn’t as magic as I thought and I need to be mounting the host filesystem?

Expected behavior

I edit file /blah/project/ in OS X.

Running application in container sees updated file.

Actual behavior

Filesystem in container is not modified by out-of-container processes


Docker for Mac: version: mac-v1.12.0.1
OS X: version 10.11.6 (build: 15G31)
logs: /tmp/AC30EBE3-5660-4C44-9F9D-05A44CB81D2F/20160811-184024.tar.gz
[OK] docker-cli
[OK] app
[OK] moby-syslog
[OK] disk
[OK] virtualization
[OK] system
[OK] menubar
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux

Steps to reproduce the behavior

I edit file /blah/project/ in OS X.

Rails app fails to reload edited file.

So I enter container’s shell (from Kitematic or via attach) and cat /blah/project/ and see the previous version of the file (from when the image was built).

For fellow noobs who may happen upon this thread: do not be confused by all the hype around Docker for Mac’s new filesystem sharing infrastructure, or existing production-oriented configurations. Using Docker for dev still requires explicitly mounting share points as described in the docs.

If you’re also working with Rails, see the excellent guides by Laura Frank and Mike Arnold.