Let's set up a Samba server with Docker.
It seems that dperson / samba is famous, so I will use it.
https://hub.docker.com/r/dperson/samba
If you don't have docker installed, install it the way you like.
sudo snap install docker
Make a container.
sudo docker create -it -p 139:139 -p 445:445 --name smbsrv -v The path you want to share:/path1 dperson/samba \
-p -r\
-u "username;password" \
-s "share;/path1;yes;no;no;username"
Start the container.
sudo docker start smbsrv
Hopefully you'll see a log like this:
# docker logs smbsrv
Added user username.
smbd version 4.12.2 started.
Copyright Andrew Tridgell and the Samba Team 1992-2020
daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
The following message is displayed when the option is incorrect. Please rewrite it appropriately and recreate it.
The 'command' (if provided and valid) will be run instead of samba
--Write the options of Docker itself before the image name "dperson / samba", and the options of dperson / samba after the image name. --- s option is "Shared folder name; Samba access location in Docker; browseable (display on network computer); readonly (read only); guest (allow guest users); access It means "possible user list (, delimited)". --On Windows, you can access it with "\ server IP address \ share". --- r option disables trash
All you have to do is add a network location and enter your username and password.
I tried CrystalDiskMark. 1 Gigabit Ethernet. HDD Formatted with ext4.
SSD Formatted with ext4.
https://www.atmarkit.co.jp/ait/articles/0005/22/news008.html
[^ 1]: Requires SATA power supply. I used the USB power cable.
Recommended Posts