Docker Community Forums

Share and learn in the Docker community.

Using a CIFS volume

I’m trying to make a UrBackup container to work on a remote (Samba share) volume.

Already read this

Still cannot make my container work (use the volume)

I create the volume like so:

docker volume create \
--driver local \
--opt type=cifs \
--opt device=//192.168.1.1/G/ \
--opt o=addr=192.168.1.1,username=the_user,password=the_password,file_mode=0777,dir_mode=0777 \
--name urbackup

Then, I create the container:

docker run -it -d \
--name UrBackup \
--restart unless-stopped \
-e PUID=1000 \
-e PGID=100 \
-e TZ=America/Argentina/Buenos_Aires \
-v urbackup:/backups \
-v urbackup:/var/urbackup \
--network host \
uroni/urbackup-server:latest

I get the following error when I start it

docker: Error response from daemon: failed to mount local volume: mount //192.168.1.1/G:/var/lib/docker/volumes/urbackup/_data, data: addr=192.168.1.1,username=the_user,password=the_password,file_mode=0777,dir_mode=0777: no such file or directory.

This does not happen when I use a local volume, but since I’m using a TP-Link router a stop-gap between a NAS, I thought I could give it a try.

To mount a Windows share on a Linux system, first you need to install the CIFS utilities package.

Installing CIFS utilities on Ubuntu and Debian:

sudo apt update
sudo apt install cifs-utils
CopyCopy
Installing CIFS utilities on CentOS and Fedora:

sudo dnf install cifs-utils
Copy
The package name may differ between Linux distributions.

Thanks. I already have the cifs-utils installed.