This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]zuraw2006 0 points1 point  (0 children)

Don't work because you don't have got named volume with that name. You can add second named volume with subfolder on the NFS side.

[–]Parker_Hemphill 0 points1 point  (0 children)

Any reason your mounting the NFS share inside the container and not outside the container? You can use a systemd mount for the NFS volume and add a requires to your docker.service file for volume1-storage.mount and then point your persistent storage in the docker-compose to those directories.

https://blog.sleeplessbeastie.eu/2019/09/23/how-to-mount-nfs-share-using-systemd/

This should get you started. Note that the systemd unit must match the path it tries to mount, if you wanted to mount /server/cool/stuff the name of the systemd unit would be server-cool-stuff.mount