1

Hey Stackoverflow community :)

first I've to tell you that im new to docker and ci & this is not working for me.

Some information regarding enviroment and motivation:

I'm using a GitLab server in this case for version control a wpad (auto proxy configuration) file.

Every change of this file affects about 2000 clients. So i decided to setup ci for that, I'm using pacparser with a small py script to validate the config. After sucessfull test passing, ci mounts a cifs share, copy original wpad to a wpad.bak and replaces the original with the new tested one.

Everything worked fine, like expected.

A few weeks later a other guy started to migrate some servers and I got into trouble with dependencies and other stuff - this was the reason why I started to move to docker, better begin with docker.

Back to the issue:

GitLab CI is starting an Ubuntu Dockercontainer with this config:

tls-ca-file = "/etc/ssl/certs/ca-certificates.crt"
image = "ubuntu"
privileged = true
cap_add = ["SYS_ADMIN","DAC_READ_SEARCH"]
disable_cache = false
volumes = ["/cache"]
shm_size = 0

the container is cloning pacparser.git and installs some apt reps but if i try to mount.cifs //remoteserver.domain.local/sharename /mnt/sharename -o usr,pw / credfile i - the ci test within docker ubuntu image - get this output:

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

i tried mounting from fstab and/or using interactive bash. i think privileged = true can be set to false...

i assume that mounting the share at the docker host and --mount the share to the container would work - but i don't like this option.

Thank you for any comment :-)

DavidBla
  • 13
  • 3
  • The `-o usr,pw / credfile` options are only exemplary, you don't use this command verbatim, right? – user3151902 Sep 15 '17 at 06:15
  • yes that is just exemplary. i wont provide real credentials here. the same mount statement is working from everywhere out of the docker container - with credfile or inline creds – DavidBla Sep 15 '17 at 12:16
  • Does this answer your question? [Mount SMB/CIFS share within a Docker container](https://stackoverflow.com/questions/27989751/mount-smb-cifs-share-within-a-docker-container) – m13r Feb 13 '20 at 14:17

0 Answers0