Unable to mount NFS fileshare to Docker container running on Azure VM
We would like to deploy our application which is running in multiple Docker containers to an Azure Virtual Machine. We would like the Docker containers to be able to mount volumes directly from an Azure Files NFS share.
The NFS share is easily mountable to the VM itself, but not to the containers. We tried both CNI and CNM network plugins (plugin installation and setup were done as suggested on Microsoft/Github documentations) for Docker, but none of them worked for us.
We always get "connection timed out" or "permission denied" errors.
The only solution we found was running Docker containers with the "--privileged" and "--network=host" options, but it is not a practical nor a secure long term solution based on the security guidlines we found.
We also tried to use blobfuse2 with another storage account and a blob container, but the resultts were the same. The blob container was mountable to the VM but not to the Docker containers directly unless the "--privileged" and "--network=host" options were set.
Is there anything else we should try/check? Azure Virtual Network setup, Docker setup or maybe something we missed configuring the Azure Files NFS share?
Ubuntu 20.04.6 LTS
Docker 24.0.5
The environment is currently in an early state, so no special network security rule is present, just the Azure defaults.