Docker container of Samba, an implementation of the Windows SMB networking protocol.
Original container forked from dockur/samba.
This fork is configured to focus more on implementing a multi-user share using Samba homes shares.
Via Docker Compose:
services:
samba:
image: dockurr/samba
container_name: samba
ports:
- 445:445
volumes:
- /home/example/data:/storageVia Docker CLI:
docker run -it -d -p 445:445 -v "/home/example/data:/storage" vincetrain/sambaDefault credentials are samba:secret, but changing these credentials is recommended.
You can connect to a share by using the following address: [server-address]/[user name]
On Windows Explorer, this looks like \\192.168.2.2\samba, where "192.168.2.2" is replaced with the address of the server behind this container, and "samba" is replaced by the username".
By default this container is configured to host a share for user "samba" with password "secret".
You can change the default credentials or add more users inside the provided users file, and binding the file to /run/secrets/users, or using the file as a Docker secret if working with Docker swarms.
Passwords are stored as NTLM MD4 hashes. To generate a NTLM MD4 hash, consider using the following command:
iconv -f ASCII -t UTF-16LE <(printf "password") | openssl dgst -MD4 -provider legacy | cut -d " " -f2
replacing "password" with the desired user's password.
You can implement group shares by modifying the provided groupshares file, and binding the file to /run/secrets/groupshares, or using the file as a Docker secret if working with Docker swarms.
If you need more advanced features, you can completely override the default configuration by modifying the smb.conf file in this repo, and binding your custom config to the container like this:
volumes:
- /example/smb.conf:/etc/samba/smb.confBuild with buildkit!
Run:
DOCKER_BUILDKIT=1 docker build . -t [registry:tag] inside of this repository's directory.
Or have the following configuration in your daemon.json
{
"features": {
"buildkit": true
}
}And build normally.
For more information, refer to the offical dockerdocs
