Inotify does not work when watching a bind mounted folder from a NFS source. Instead, if that NFS share is mounted on host and then that mount point used as volume source, it works as expected.
Host info:
Ubuntu 20.04.5 LTS
Docker version output:
Client: Docker Engine - Community
Cloud integration: 1.0.17
Version: 20.10.14
API version: 1.41
Go version: go1.16.15
Git commit: a224086
Built: Thu Mar 24 01:48:02 2022
OS/Arch: linux/amd64
Context: default
Experimental: trueServer: Docker Engine - Community
Engine:
Version: 20.10.14
API version: 1.41 (minimum version 1.12)
Go version: go1.16.15
Git commit: 87a90dc
Built: Thu Mar 24 01:45:53 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.13
GitCommit: 9cc61520f4cd876b86e77edfeb88fbcd536d1f9d
runc:
Version: 1.0.3
GitCommit: v1.0.3-0-gf46b6ba
docker-init:
Version: 0.19.0
GitCommit: de40ad0
NFS volume config on compose:
volumes:
datalake:
driver_opts:
type: "nfs"
o: "addr=x.x.x.x,nfsvers=4"
device: ":/path/to/share"