Access Windows Shared Folder from Docker Container Linux OS


Follow these steps:


1. Install samba

for Debian / Ubuntu

$ sudo apt-get install samba

for CentOS

$ yum -y install samba samba-client cifs-utils


2. Make a directory

$ mkdir -p /mnt/files


3. Edit /etc/samba/smb.conf

$ sudo nano /etc/samba/smb.conf

and change :

-security = domain

-workgroup = WORKGROUP


4. Execute this command

$ mount -t cifs //ip-address-windows-shared-folder/files /mnt/files -o username=Admin,password=Admin123


5. Check

$ ls /mnt/files/


6. To unmount

$ umount /mnt/files


Done.


Source :

https://www.javatpoint.com/how-to-access-windows-shared-folder-from-ubuntu

https://community.pyramidanalytics.com/t/q6h0f4g/how-to-access-a-windows-shared-folder-from-linux-using-the-command-line

https://stackoverflow.com/questions/18670170/mount-remote-windows-share-from-centos

Comments