Closed Ashcora closed 1 year ago
I would like an example too, for some reason container keeps restarting
Sample docker-compose.yaml, not showin all option but at least works well for me:
version: '3'
services:
samba:
image: dperson/samba
container_name: samba
restart: always
ports:
- 129:129
- 445:445
volumes:
- /dockervolumes/samba:/mount
environment:
USER: "user1;password1"
SHARE: "usershare;/mount/;yes;no;no;user1"
USERID: 1000
GROUPID: 1000
Explanation
Docker host has a folder (/dockervolumes/samba
) owned by 1000:1000 (user id, password), you can find your group and user IDs easily, using id
command. On the host machine, /dockervolumes/samba
should be owned by 1000:1000 (see chown
details).
The smb user is USER1 with PASSWORD1 and the share name that you can observe when watching with client is "usershare". It is available only for "user1" and requires password ("password1") to log in.
All shares are stored in /mount
(so here it is /mount/usershare
) and physically located in /dockervolumes/samba/usershare
.
Hope it helps
Thank you!
Is it possible to provide a full example of docker-compose.yml in our repo containing all environment variables in that example file?