SMB folder as primary data folder -- Windows Server > Hyper-V > Ubuntu server > Docker compose

Alright, been fighting this for hours. I’ve scoured the internet and can’t find a working solution:

I have a Windows Server using Hyper-V, which has Ubuntu server installed running docker compose for Nextcloud.

Long story short, I am trying to make my already existing share \SERVER\Nextcloud the default storage location for all data that users would put in. I’ve installed cifs-utils and smb for ubuntu server and have mounted the share to /mnt/nextcloud with my AD credentials(though nothing shows up here when I ls). Yes, I’ve made sure I have access in advanced sharing permissions.

Has anyone accomplished this? I’ve also tried adding via external storage app but it just keeps failing. Perhaps this has to do with the fact I’m trying to reference my host server? I can’t ping it from my ubuntu server VM and vice versa

Hello,

Off Topic.

I have similar setup running via Snap with Windows 11 / Hyper-V / Ubuntu Server 24. Refer here → Installation Advice - #7 by NaXal

Here, I run PhotoPrism via docker / docker compose in similar manner, as you have described.

So I am sure, Docker / Docker compose does work with external SMB share mounts with Hyper-V

Can you please elaborate a little like your mounting process and that fstab entry? Also your compose file, how does it look.

I am no expert but docker can mount external SMB mounts directly in a container. I have not tried that, but just a heads up. Since that is said to be more secure than my process of mounting on OS level with 777 permissions and fault tolerant when OS fails to mount but container starts on mount location in anyway.

Thanks.