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=// \
--opt o=addr=,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 \

I get the following error when I start it

docker: Error response from daemon: failed to mount local volume: mount //, data: addr=,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
Installing CIFS utilities on CentOS and Fedora:

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

Thanks. I already have the cifs-utils installed.