Simple dockerfile to build a ubuntu image that will connect to my SMB share.
FROM ubuntu:latest
RUN apt install nano -y
RUN apt install cifs-utils -y
RUN mkdir media/share
COPY ./files/ /etc/
Inside the ./files folder is a txt file with my credentials for smb. After I build and run the container, I run the command “mount -t cifs -o vers=3.0,credentials=/etc/.smb_credentials.txt //ip-addr/dataset_name /media/share” and I get an error “mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)”.
But if I quote out the “COPY” command and then manually add the credential text file it connects without a problem. I have went thru and checked permissions to all the files involved and they all seem to be fine. I have even checked the file permissions when it works and made sure to set them to the same when it doesnt work. It still wont work. I dont get what is so detrimental about the copy command that makes this throw an error no matter what I do.