Use docker create nfs server

create a new folder

/home/lizhe/shared
docker run -d --privileged  -v /home/lizhe/shared:/nfs -e NFS_EXPORT_DIR_1=/nfs -e NFS_EXPORT_DOMAIN_1=\* -e NFS_EXPORT_OPTIONS_1=rw,insecure,no_subtree_check,no_root_squash,fsid=1 -p 111:111 -p 111:111/udp -p 2049:2049 -p 2049:2049/udp -p 32765:32765 -p 32765:32765/udp -p 32766:32766 -p 32766:32766/udp -p 32767:32767 -p 32767:32767/udp fuzzle/docker-nfs-server:latest

how to mount it

sudo apt update
sudo apt install nfs-common

sudo mkdir /mnt/nfs

sudo mount 192.168.204.137:/nfs /mnt/nfs
Send a Message