Mount NFS volume from macOS

When we try to mount an NFS with

docker run --rm -i -v MY_MOUNT:/data alpine

from macOS we get the error message:

docker: Error response from daemon: error while mounting volume ‘/var/lib/docker/volumes/…/_data’: failed to mount local volume: mount :/data:/var/lib/docker/volumes/…/_data, data: addr=…,vers=4: operation not permitted.

or

docker: Error response from daemon: error while mounting volume ‘/var/lib/docker/volumes/…/_data’: failed to mount local volume: mount :/data:/var/lib/docker/volumes/…/_data, data: addr=…,vers=4: connection refused.

To be able to mount the volume from macOS, use the insecure option in /etc/exports

MY_MOUNT 10.0.0.0/8(rw,sync,no_root_squash,no_all_squash,insecure)

Leave a comment

Leave a Reply