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

0
1
Asked By CuriousCat99 On

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.

3 Answers

Answered By ContainerCrafter57 On

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.

CuriousCat99 -

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.

Answered By NFS_Explorer42 On

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.

CuriousCat99 -

I’m mapping them with user: 1000:1000, which should be the host UID and GID.

Answered By DockerDude88 On

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.

CuriousCat99 -

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.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.