nfs-docker

Create directory named nfs and create a docker volume with it:

mkdir nfs
docker volume create \
  --name nfs \
  --opt type=tmpfs \
  --opt device=$(pwd)/nfs \
  --opt o=bind

Running it

sudo docker-compose up -d

Test

Open bash for server

docker exec  -it server /bin/bash

Create a test.txt file

echo "hello" > /nfs/home/test.txt

Open bash for client

docker exec  -it client /bin/bash

Opne test.txt file

cat /home/test.txt

You should see hello in the terminal.