Why isn't my NFS mount showing up in my Docker container?

August 5, 2025 3 answers
Asked by cOdE revue
I'm having trouble with an NFS mount that works fine on my local Ubuntu machine, but when I try to map it in a Docker container, it's not showing up. I'm using the command to map it as -/mnt/folder:/folder, but even though my container is running in privileged mode, that hasn't solved the issue. I'm running on Ubuntu Server 24.04, and I'm wondering what I'm missing here.

Answers

survey5.fix
It's important to look at how you mounted the NFS on the host. What NFS version are you using? This info can really help pin down the problem.

cOdE revue: I'm using NFS version 4 from a Synology NAS. Itโ€™s set up through fstab and is visible in the host OS, just not in Docker.

Reply to this answer
cache4way
Have you checked if the UID of the user on your host matches the UID of the user in the Docker container? If they're different, it could be causing the issue with the mount not being visible.

cOdE revue: Iโ€™m mapping them with user: 1000:1000, which should be the host UID and GID.

Reply to this answer
quasar redshift
What does your Docker command look like? Make sure that the NFS mount is properly set up before your container starts. It might be helpful to verify that the mount exists and is accessible first, then start the container.

cOdE revue: Iโ€™ve tried starting them afterward, but it still doesn't work. The volumes look like this: - /mnt/program:/program. All other local folders map just fine except for that NFS one.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions