According to the cifs.mount ,manpage link, the required mount parameter is “seal”, which has to be provided with the parameter “vers=3.0” (or any other version >=3.0)
seal Request encryption at the SMB layer. The encryption algorithm used is AES-128-CCM.
Requires SMB3 or above (see vers).
Is that supported in docker?
—fyi: according to the RHL documentation, a typical encrypted cifs mount command would look like this:
To mount the \\server\example\ share as the DOMAIN\Administrator user over an encrypted SMB 3.0 connection into the /mnt/ directory:
mount -t cifs -o username= DOMAIN \ Administrator ,seal,vers=3.0 // server / example /mnt/ Password for user_name @// server_name / share_name : ********
It seems the issue here is that the credentials-file is a feature of the wrapper binary “mount.cifs” while docker uses the systemcall SYS_MOUNT itself for mounting the volume
if it’s supported from your os, then it is high likely to be usable by docker. The only thing that I am aware of that doesn’t work is the credentials option where a credential file is referenced, that holds the username/password.
I don’t’ particularly like CIFS/SMB, but I was gonna give a try, only because it seems it is the only viable solution offering native transport encryption (i.e. without having to tunnel it, or install kerberos etc…).
But if it is not possible to use the credentials file, I think I will not even try CIFS in this use-case. I find storing the password in clear-text unacceptable. I did some digging and there doesn’t seem to be any reasonable solution/workaround.
But this is fine, as I now understand better docker’s limitations. I wish they would have documented all these simple things!!