I have created an NFS volume, as shown:
docker volume create -d local -o type=nfs -o device=:/"$(pwd)"/myshare -o o=addr=host.docker.internal,rw mynfs
and started my container, as shown:
docker run --volume mynfs:/mnt/mymnt --privileged --name mount -it myimage bash
I have an ISO file within my docker image that I would like to mount at /mnt/mymnt
so that the files within the ISO are usable from the host. Is this possible?
Simply mounting the ISO to /mnt/mymnt
allows me to view the files from within the docker but not from the host (i.e. $(pwd)/myshare
remains empty).
I can get this to work on a Linux host by using the docker volume mount option bind-propagation=shared
but I’m trying to get it to work over NFS so I can use it on non-Linux hosts.