I first created a running Windows 10 VM environment + licensed msoffice and stuff running in qemu-kvm on my Ubuntu 18.04 LTS system; powered by Thinkpad t460 tbh :proud:
then there was the problem… sharing files between the hosts.
I was thinking about networking + virtualization solutions to overcome this so I just found this very useful, interestingly documented, nice docker container; easy to configure and ready to use : dperson/samba
Thank you dperson, this is very useful!
Next step: Run this one liner docker run to have SMB protocol up and running on your environment, I will explain the command below :
$ sudo docker run -it --name samba -p 139:139 -p 445:445 -v /mnt:/share -d dperson/samba -w "USERS" -u "win;badpasswd" -s "users;/share;yes;no;yes;win;win;win;win"This above command will pull the image from the hub and run it with the following samba configuration for smbd.
/share mountpoint inside the docker container will bind mount onto /mnt on Ubuntu host and
make sure there’s a user named win privileged by badpasswd to make sure it can access and rw onto shared “users” directory. Make sure it’s running :
$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fe43d80f567a dperson/samba "/sbin/tini -- /usr/…" 24 minutes ago Up 24 minutes (healthy) 0.0.0.0:139->139/tcp, 137-138/udp, 0.0.0.0:445->445/tcp samba

Just smooth

Troubleshooting
Some useful stuff to troubleshoot around$ sudo docker inspect $ID $ sudo docker logs $ID
$ sudo smbclient -L localhost -Uwin -WUSERS WARNING: The "syslog" option is deprecated Enter USERS\win's password:To remove the docker container in case of any need :Sharename Type Comment ---------
users Disk win
IPC$ IPC IPC Service (Samba Server)
Reconnecting with SMB1 for workgroup listing.
$ sudo docker stop sambaI find myself suprised how come these 2 very different systems have started to work together very nice, delighted.
$ sudo docker rm samba
$ sudo docker volume prune (this will attempt to remove all unusued volumes by docker)
Hope you enjoy it!
İlk Yorumu Siz Yapın