Skip to content

Include /etc/nsswitch.conf in chroot jail

Daniel Estermann requested to merge d.esterman/gitlab-pages:master into master

What does this MR do?

Having GitLab server behind NAT or WAF results in its hostname resolving to an external IP address. To fix this, the simplest option is to use /etc/hosts file with static assignment of the hostname to an internal IP address.

In !124 (merged), /etc/resolv.conf and /etc/hosts have been introduced to be added to chroot jail. But apparently, that's not enough. Additionally /etc/nsswitch.conf file must exist as well. See this golang issue for the reference: https://github.com/golang/go/issues/22846

TODO

Edited by Daniel Estermann

Merge request reports