Docker container of Samba, a re-implementation of the Windows SMB networking protocol.
Via docker-compose
version: "3"
services:
samba:
image: dockurr/samba
container_name: samba
environment:
USER: "samba"
PASS: "secret"
UID: 1000 # Optional, default 1000
GID: 1000 # Optional, default 1000
RW: true # Optional, default true
ports:
- 445:445
volumes:
- /home/example:/storage
restart: on-failure
Via docker run
docker run -it --rm -p 445:445 -v "/home/example:/storage" -e "USER=samba" -e "PASS=secret" -e "UID=1000" -e "GID=1000"dockurr/samba
-
You can set the
USER
andPASS
environment variables to modify the credentials for the share from their defaults (usersamba
with passwordsecret
).To change the storage location, you can bind
/storage
to the location you want to use for the share.If you need more advanced features, like multiple shares, you can modify the
smb.conf
file in this repo, and bind mount it to the container like this:volumes: - /example/smb.conf:/etc/samba/smb.conf