We have been switching our local development setup slowly, but successfully to docker with NFS for speed. Almost everyone at the company is developing on a Mac system and so with the new Catalina release, everyone either pressed the “Update” button, or, like me, woke up to a new OS, got their cup of coffee, and typed in
But instead of starting the containers, this is what I ended up with:
ERROR: Cannot create container for service app: b'failed to mount local volume: mount :/Users/me/Documents/project:/var/lib/docker/volumes/project-dev-app/_data, data: addr=192.168.65.2,nolock,hard,nointr,nfsvers=3: permission denied'
A quick Google search yielded this article. After applying all the changes, the author expects your problems to be over. Alas, they were not. In the end I was presented with a new error:
ERROR: Cannot create container for service app: b'open /var/lib/docker/volumes/project-dev-app/_data: stale NFS file handle'
You won’t guess what it is, but it has to do with my project being in “Documents” folder. Yeah… Apparently,
Starting with macOS 10.15 (Catalina), file directories that belong to a user (eg. Downloads, Documents, Desktop, etc.) will require explicit permission to be accessed by your Apps.
It looks like MacOS’s Transparency, Consent, and Control (TCC) that tightens security by granting users modular permissions doesn’t work well with NFS.
Hours of digging and struggling later, the solution appears to be moving the project out of the the “Documents” folder and directly under “User”. Docker is finally up and running.