vgist / dockerfiles

🐳 A collection of delicious docker recipes.
https://hub.docker.com/u/gists/
Apache License 2.0
164 stars 62 forks source link

nfs-server: error message "Unable to access /proc/fs/nfsd" #16

Closed SimonHeimberg closed 3 years ago

SimonHeimberg commented 4 years ago

I get the following error message:

rpc.nfsd: Unable to access /proc/fs/nfsd errno 2 (No such file or directory).
Please try, as root, 'mount -t nfsd nfsd /proc/fs/nfsd' and then restart rpc.nfsd to correct the problem

I run the command:

docker run -d --cap-add SYS_ADMIN --cap-add SETPCAP -v /my/dir/:/nfs-share gists/nfs-server:2.4.1

What am I doing wrong?

By the way, the script does not abort on this error. Maybe add set -o errexit at start

SimonHeimberg commented 4 years ago

Ah, it is the same as https://github.com/sjiveson/nfs-server-alpine/issues/8

Depending on host (kernel, ...) the capabilities are not sufficient.