简体   繁体   中英

Docker - mount cifs volume without subfolder

Is it possible mount CIFS volume root folder?

Something like this:

my-storage:
        driver: local
        driver_opts:
            type: cifs
            device: '//IP-address'
            o: 'file_mode=0600,dir_mode=0755,username=admin,password=pass'

I only managed to mount a subfolder like //IP-address/some-dir

I don't think this will work this way, the listing of shares on a server is not the same as listing of objects in a share. These are different protocols. Thus it must be handled another way by the client. What you call root folder is not a folder but the listing of shares on the host, it could be a printer as well.
Example Share Listing: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rap/48dd86d2-4092-49a4-9024-308f0ed77520
Example Directory Listing: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/10906442-294c-46d3-8515-c277efe1f752
As you can see, the first is called MS-RAP, the second MS-SMB. An overview of how protocols interact, see here: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb/592d0cbe-41d0-4b8e-8bb9-a60edd85e5e8

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM