Skip to content

Commit 8097403

Browse files
committed
Adding usage of CIFS mounts so it is clear how to connect to a Samba share also by using hostnames.
1 parent 17507f0 commit 8097403

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

storage/volumes.md

+13
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,19 @@ docker service create -d \
500500
nginx:latest
501501
```
502502

503+
### Create CIFS/Samba volumes
504+
505+
You can mount a Samba share directly in docker without configuring a mount point on your host.
506+
```bash
507+
docker volume create \
508+
--driver local \
509+
--opt type=cifs \
510+
--opt device=//uxxxxx.your-server.de/backup \
511+
--opt o=addr=uxxxxx.your-server.de,username=uxxxxxxx,password=*****,file_mode=0777,dir_mode=0777 \
512+
--name cif-volume
513+
```
514+
Notice the `addr` option is required if using a hostname instead of an IP so docker can perform the hostname lookup.
515+
503516
## Backup, restore, or migrate data volumes
504517

505518
Volumes are useful for backups, restores, and migrations. Use the

0 commit comments

Comments
 (0)