Pull image:
docker pull viettu123/samba
Or build from Dockerfile
build.sh
Map path host /path-host/
to share volume, user smbuser
,
password 123456
docker run -it -p 139:139 -p 145:145 -v /path-host/:/data/ -e smbuser=smbuser -e password=123456 --name samba viettu123/samba
smb://ip/data
docker volume create \
--driver local \
--opt type=cifs \
--opt device=//IP/data \
--opt o=username=smbuser,password=1234567,file_mode=0777,dir_mode=0777 \
--name smb
volumesmb:
driver: local
driver_opts:
type: cifs
device: //192.168.1.5/data
o: "username=smbuser,password=1234567,file_mode=0777,dir_mode=0777"