sjiveson / nfs-server-alpine

A handy Alpine Linux based NFS Server image running NFS v4 only, over TCP on port 2049
https://hub.docker.com/r/itsthenetwork/nfs-server-alpine/
GNU General Public License v3.0
295 stars 187 forks source link

Question: Is it possible to create more than one shared folder? #20

Closed azizunsal closed 6 years ago

azizunsal commented 6 years ago

I think it is not possible to create multiple shared folder(/path/to/share_1 /path/to/share_2) in the current configuration. I wonder if there is some technical issues causing not to implement in that way.

By the way thank you for this Docker image.

sjiveson commented 6 years ago

Hey Aziz, thank you.

Yes, its possible and relatively simple. However, optionally accommodating a varying number of shared folders (possibly with differing parameters) for different user needs becomes complicated.

In the short term you could easily duplicate the first line of confd/tmpl/exports.tmpl and change SHARED_DIRECTORY to, for instance SHARED_DIRECTORY_2, rebuild the image and feed in the additional variable.

I will look into adding this to the code here, with the caveat that other variables around sync, read-only etc. will have to be the same for all shares.

azizunsal commented 6 years ago

Hi Steven, Thank you for your response. I will use your image because it's cleaner and readable when I compare it to the other existing NFS images. Maybe more advanced configurations can be added as you said.

azizunsal commented 6 years ago

Btw, I didn't notice that there was a closed issue for the same question. Sorry..

sjiveson commented 6 years ago

No problem, I'm hoping I can use confd to accommodate this while keeping it clean and simple for those that don't want it.

sjiveson commented 6 years ago

FYI, I've got to this and the work is in branch byebyeconfd (which also removed use of confd) - hope to be done soon.

sjiveson commented 6 years ago

Hey. I've made some changes to help support this, please see the latest README.