1
votes

I am curious if there is any easier way to accomplish what I finally got working: A Docker container on Windows with a cifs/smb/samba volume mount.

The only way I could get this working was to setup a VM (Ubuntu), use a docker plugin (NetShare), and then configure everything appropriately with a user account and permissions (setup a new user on the ubuntu VM with similar PUID and PGID IDs as the user who can read/write on the smb share). I then had to ensure the container started up with the correct PUID and GUID, like the sonarr docker image mentions: linuxserver/sonarr

I tried to use fstab, autofs, and straight up mount -t cifs commands in the Dockerfile but it doesn't sound like this is possible since you can't mount in a virtualized process like a container based on what I read.

2

2 Answers

0
votes

This is exactly what I was trying to do: https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-storage#smb-mounts

Note: It is only available on Windows Server 2016 (1709)

-1
votes

It's not that hard to accomplish what you need.

Here is my approach:

  1. I've set up a VM with Ubuntu and then i followed the install Sonarr using Docker guide from here
  2. I created a shared folder using windows sharing
  3. I configured Sonarr to use the shared folder with the correct username and password.

Please note that you can also install Sonarr on Docker using Kitematic GUI if you don't want to create the Ubuntu VM. This way, you will be able to set your paths directly in kitematic.

Also, make sure you keep an eye on the network settings section in Kitematic, if you choose to do it this way.

Good Luck!