balena nfs server project

I would like to create a simple NFS server project (both for the experience but also with a need in mind), but am struggling how to start. The server would serve RW storage across my home network for any device to connect to. Storage would be in the from of a SATA drive, being based on the BananaPi, but equally a USB stick could get added to be shared.

I have the following basic parts set out that I want project to do:

  • install base image
  • install nfs tools
  • define storage device(s) as environment variable
  • mount device
  • export mounted directory to

I’ve played around with Dockerfile and docker-compose files, it’s just a matter of meeting my requirements I’m unsure about. Could any one point in the right direction for getting started.

hey there @n1md4

Perhaps take a look at this project as a starting point: GitHub - bcheck555/balena-pi-aio

I’ve not tried or tested it, but it looks like it has an NFS server implementation which you could use, and simply remove the other components if you don’t need them.