Question Mapping Windows Shared Folder to Syno Docker Container?

Currently reading
Question Mapping Windows Shared Folder to Syno Docker Container?

Telos

Subscriber
2,838
897
NAS
DS418play, DS213j, DS3622+, DSM 7.2.4-11091
I'm running Duplicati in Docker to backup my NAS. Duplicati has the option to restore to the source location or another. I want to restore to a Windows PC on the same LAN as my NAS would work.

In the Docker GUI the Volume tab only allows access to the NAS. So I opened a terminal window to mount my Windows shared folder "bkup" (which would be the restore destination), but it is alluding me.

For example sake ...
PC Name: mypc
PC LAN IP: 192.168.1.11
Shared Folder: bkup (on the PC's "D" partition)

I found a reference to do this...
$docker run -v \\mypc\bkup\src:/mnt/mypc mypc/duplicati_bkup

or
$docker run -v \\mypc\bkup\src:/mnt/mypc mypc/duplicati_bkup


But this is useless in bash terminal, not a $docker command line ... so I am completely lost. In other web searches, I've read this is not possible to do (but those posts are 4 years old).

Ideas?
 
Running a container in privliged mode and beeing lucky that cifs is installed in the container is not realy docker-esque... Thus, the way you tried will most likely not succeed... A docker volume needs to be declared to a mount remote share, which needs to be used with your container.

The solution requires SSH access to the DS :
1. Connect to your DS via ssh.
2. Become root to execute docker commands -> `sudo -i`,
3. Create your volume:
`docker volume create \
--driver local \
--opt type=cifs \
--opt o=addr=mypc,rw \
--opt device=//mypc/bkup/src \
--opt o=uid=0,username={username},password={password},nounix,file_mode=0770,dir_mode=0770 \
my-volume`

I am not sure if this works with hostnames as well, maybee you will need to replace "mypc" with the ip. my-volume can be a name of your choosing.

4. Start your container: `docker run -v my-volume:/mnt/mypc mypc/duplicati_bkup`
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Control Panel/Shared Folders/Edit... Change "Location" to point to desired volume. Files/folders/ link...
Replies
11
Views
598
Interesting. I'm definitely learning something new everyday while exploring docker & my synology too...
Replies
4
Views
408
I asked as well how do you run this container. Have you setup --shm-size parameter?
Replies
6
Views
3,624

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Top