I'm new to Docker, but I'm trying to deploy some containers that will need to read and write to a network shared volume. I'm hoping to run things like Navidrome, Immich, and an Arr Stack. The containers are on Ubuntu and my network volume is on a qnap machine. It is discoverable from Ubuntu without issue.

Do I need to mount the shared volume in Ubuntu or can I just refer to it in the Docker Compose file?

I know I need to mention the location of the volume in the Docker Compose file, but I'm not sure how to write that. How do I include the un/pw information for the NAS?

I read about bind mounts in Docker's documentation. Is that what I want to use? Again, how do I include the un/pw information? I'm not sure how to use the commands.

The volume path for the navidrome folder is //tiger-nas/music/music for example.

I appreciate any help.

you are viewing a single comment's thread
view the rest of the comments
[–] 9 points 11 months ago (2 children)

Mount the network share (fstab or mount.cifs), and pass the login using the username= and password= mount options. Then point the volume at the mount point's path.

https://www.mattnieto.com/how-to-mount-an-smb-share-to-a-docker-container-step-by-step/

  • source
  • hideshow 2 child comments