Name resolution in container

Hi,

im trying to deploy a gitlab container inside of a QNAP container station. After deploying all containers (redis, postgresql, gitlab) from scratch, fixing various Script and permission errors everything is now running fine.

Except SMTP mailing and LDAP authentication. Running LDAP-tests in ‘git’-usercontext fails, BUT when running as root i can run the LDAP-test fine. Tracing the problem further i got, that i am unable to resolve ANY hosts while in user context.

“cat /etc/resolv.conf” fails with ‘permission denied’ when run under user context (even if the file has 644 permissions set - changing it to 777 doesnt change anything). So i determined that the file is mounted from the host-machine (and in fact - in the QNAP-filesystem i can find the corresponding resolv.conf - changes there are IMMEDEATELY reflected in the container-file, so its not copied at container-start but seems to be mounted in some way).

Changing the permission in the host-filesystem doesnt change the Problem in any way - every user besides ‘root’ is unable to use name resolution in the container - even if both files in the host AND the container are changed to 777.

I am quite unsure if this is caused by:

  • the container
  • docker
  • the QNAP container-station-application

but because i got the mount-point for the resolv.conf-file from

‘docker inspect gitlab’:

[…]
“ResolvConfPath”: “/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/containers/1de95ff8ca7d589f2263d5a6b8a5c737d3c42c732face74424a21f4e1c57e584/resolv.conf”,
[…]

i started to look here for advice first. Is there a way to get user access to the resolv-file and allow them to resolve ip-adresses like with nslookup or just simple ping?

Any help appreciated, thanks in advance.

Any news on this? I’m facing the same problem at the moment. Could you fix it?