NanoPC-T4 利用docker搭建samba服务
拉取镜像
docker pull dperson/samba
创建本地共享文件夹
mkdir /home/share
docker run -it --name samba -p 139:139 -p 445:445 -v /home/share:/mount -d dperson/samba -u "user;123456" -s "share;/mount/;yes;no;no;all;user;user"
连接测试
连接到服务器 ,地址填 //192.168.188.40
连接挂载成功,如图
运行后添加用户可进入容器里面添加,
docker exec -it samba /bin/bash
配置文件
vi /etc/samba/smb.conf
[share]
path = /mount/
browsable = yes
read only = no
guest ok = no 匿名用户不允许访问
veto files = /.apdisk/.DS_Store/.TemporaryItems/.Trashes/desktop.ini/ehthumbs.db/Network Trash Folder/Temporary Items/Thumbs.db/
delete veto files = yes
admin users = user01 //管理的用户
write list = user01 写入的用户
评论区