Changes to files under /Users on MacOSX should trigger inotify events observable inside container using inotifywait from inotify-tools ubuntu package.
Actual behavior
No events are triggered. However, when mapping /tmp, the events are propagated and can be observed using inotifywait.
Information
$ pinata diagnose -u
OS X: version 10.11.5 (build: 15F34)
Docker.app: version v1.11.1-beta12
Running diagnostic tests:
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[OK] environment
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160521-205650.tar.gz
Most specific failure is: No error was detected
Your unique id is: 4AC8DD0F-78B5-4EE1-B74E-4952B9A7C691
Container created using the following command:
docker run -it -v /tmp:/mnt/tmp -v /Users:/Users ubuntu:16.04 bash
Steps to reproduce the behavior
Create the container using command above
Install inotify-tools inside container
Listen for events using inotifywait -rm <file_or_folder>
Create or modify files under /tmp and under /Users on MacOSX
Observe that events are received in container for changes under /tmp; but not received for changes made under /Users
UPDATE: This morning I was testing whether file permissions or ownership on /Users would make a difference and I was both restarting the Docker app and recreating test containers when suddenly notifications started coming through. I’ve restored file permissions and ownership on /Users but the notifications are still working.
At this point I’m unable to reproduce the issue. I am guessing restarting the docker app fixed the issue. Will post further updates if I see the issue again.
UPDATE: Notifications suddenly stopped after working well for a few hours. Restarting container and restarting docker app did not help. However, recreating the container made notifications work again!
OS X: version 10.11.5 (build: 15F34)
Docker.app: version v1.11.1-beta13.1
Running diagnostic tests:
[OK] Moby booted
[OK] driver.amd64-linux
[OK] vmnetd
[OK] osxfs
[OK] db
[OK] slirp
[OK] menubar
[ERROR] environment the variables DOCKER_REGISTRY_PASS DOCKER_REGISTRY_BASE DOCKER_REGISTRY_USER DOCKER_GATEWAY should not be set
[OK] Docker
[OK] VT-x
Docker logs are being collected into /tmp/20160603-162525.tar.gz
Most specific failure is: the variables DOCKER_REGISTRY_PASS DOCKER_REGISTRY_BASE DOCKER_REGISTRY_USER DOCKER_GATEWAY should not be set
Your unique id is: 89F7BC19-030E-4E42-A396-E86E74332227
Please quote this in all correspondence.
inotifywait doesn’t work for me either even though I didn’t use the symlinked /tmp. docker run -it -v /private/tmp/:/mnt/tmp ubuntu:16.04 bash
Any changes I make to api/index.js doesn’t cause a restart. Oddly enough, if I remove the .git directory from the ignore list, pm2 reloads perpetually indicating that changes are detected on .git/index.lock
I also tried running inotifywait -r -m on api/index.js and it doesn’t report any changes when I modify them from within OS X.
The command is docker run -v .:/opt/app <my-app>:latest pm2 process.yaml (somewhere under /Users/bez/)
Here is the result of diagnostics:
Docker for Mac: version: mac-v1.12.0-beta17
OS X: version 10.11.5 (build: 15F34)
logs: /tmp/20160629-172001.tar.gz
[OK] docker-cli
[OK] app
[OK] menubar
[OK] virtualization
[OK] system
[OK] osxfs
[OK] db
[OK] slirp
[OK] moby-console
[OK] logs
[OK] vmnetd
[OK] env
[OK] moby
[OK] driver.amd64-linux