Skip to content

Instantly share code, notes, and snippets.

@psolru
Created May 4, 2022 23:23
Show Gist options
  • Save psolru/2142b38a916a67c56142dd45a0a411ec to your computer and use it in GitHub Desktop.
Save psolru/2142b38a916a67c56142dd45a0a411ec to your computer and use it in GitHub Desktop.
Docker volume CIFS mount example w/ symlink support
---
version: "3.0"
services:
web:
image: some-image
volumes:
- cifs_share:/mnt/cifs_share
volumes:
cifs_share:
driver: local
driver_opts:
type: "cifs"
device: "//CIFS_STORAGE_ADDRESS/PATH"
# addr => needed so docker can actually resolve the address
# uid=1000,gid=1000,file_mode=0664,dir_mode=0774 => has to make sense, obviously
# mfsymlinks => will mount the cifs w/ symlink support
o: "addr=CIFS_STORAGE_ADDRESS,username=<USER>,password=<PASSWORD>,uid=1000,gid=1000,file_mode=0664,dir_mode=0774,mfsymlinks"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment