vtacquet/samba
lightweight samba server 4.15.2 on alpine 3.15 (with snapshots and recycle bin)
427
Description: Creates a basic samba container with snapshots and recycle bin.
environment variables:
PERMISSIONSx=true - set to recursively update permissions on share x path
BTRFSx=true - set when share x path is on a BTRFS filesystem
RECYCLEx=true - set to enable recycle bin on share x (hidden .recycle folder will be created on first delete)
SNAPSHOTSx=true - set to enable VSS integration on share x (on supported filesystems ex. BTRFS)
example SHARE1=public;/data;yes;no;yes first boolean: browsable (yes) second boolean: read only (no) third boolean: guest ok (yes)
example SHARE2=vincehome;/data/home/vince;yes;no;no;vince first boolean: browsable (yes) second boolean: read only (no) third boolean: guest ok (no) fourth field: user
(user number not related to share number, make a link in the fourth field of the SHARE environment variable) example USER1=vince;rules (user;password) example SHARE2=vincehome;/data/home/vince;yes;no;no;vince
for snapshots:
create a BTRFS subvolume for the data and the .snapshots folder btrfs subvolume create /opt/docker/samba/data btrfs subvolume create /opt/docker/samba/data/.snapshots
create read-only snapshots in the .snapshots folder with the following naming format @YYYY.MM.DD-HH.MI.SS btrfs subvolume snapshot -r /opt/docker/samba/data /opt/docker/samba/data/.snapshots/@2021.03.11-01.00.00
docker-compose example:
samba:
hostname: samba
container_name: samba
image: vtacquet/samba:latest
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/docker/samba/data:/data
tmpfs:
- /tmp
environment:
# general
- TZ=Europe/Brussels
- DEBUG=false
# share information
- SHARE1=data;/data;yes;no;yes
- BTRFS1=true
- SNAPSHOT1=true
- RECYCLE1=true
- PERMISSIONS1=true
# ----
- SHARE2=vincehome;/data/home/vince;yes;no;no;vince
- BTRFS2=true
- SNAPSHOT2=true
- RECYCLE2=true
- PERMISSIONS2=false
# user information
- USER1=vince;rules
stdin_open: true
tty: true
docker pull vtacquet/samba