A handy NFS Server image comprising Alpine Linux and NFS, over TCP on port 2049.
The image comprises of;
When run, this container will make whatever directory is specified by the environment variable SHARED_DIRECTORY.
docker run -d --name nfs --privileged -v /some/where/fileshare:/nfsshare -e SHARED_DIRECTORY=/nfsshare itsthenetwork/nfs-server-alpine:latest
Add --net=host or -p 2049:2049 to make the shares externally accessible via the host networking stack. This isn't necessary if using Rancher or linking containers in some other way.
Adding -e READ_ONLY will cause the exports file to contain ro instead of rw, allowing only read access by clients.
Adding -e SYNC=true will cause the exports file to contain sync instead of async, enabling synchronous mode. Check the exports man page for more information: https://linux.die.net/man/5/exports.
Adding -e PERMITTED="10.11.99.*" will permit only hosts with an IP address starting 10.11.99 to mount the file share.
More info see: https://github.com/sjiveson/nfs-server-alpine
Content type
Image
Digest
sha256:b9346ac0b…
Size
22.4 MB
Last updated
about 2 years ago
docker pull yylt/nfs-server