Ubuntu挂载smb到本地
常规
sudo apt-get install cifs-utils -y
sudo mkdir /airdisk;vim /etc/fstab
在/etc/fstab
添加
//192.168.123.22/新加卷-a/airdisk cifs username=airdisk,password=1234qwer,iocharset=utf8,sec=ntlm 0 0
sudo mount -a
临时使用: mount -t cifs -o username=eric,password=123qwe //10.1.20.218/share_test /mnt/share_test -o vers=2.1
Docker
docker run -d --name smb-mount \
--restart=unless-stopped \
--cap-add SYS_ADMIN \
--cap-add DAC_READ_SEARCH \
--security-opt apparmor:unconfined \
-e SERVERPATH="//10.1.20.155/share" \
-e MOUNTOPTIONS="vers=2.1,uid=1000,gid=1000,rw,username=XXXXXX,password=XXXXXXX" \
-v /mnt/HostMountPoint:/mnt/smb:shared \
mumiehub/smb-mount