Include /etc/nsswitch.conf in chroot jail
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
-
Added the Changelog
(e.g.Changelog: feature
) trailer to the commits that need to be included in the changelog -
Added unit tests (if required) -
Added acceptance tests (if required) -
Documentation (if required) -
Code review guidelines -
Go Style guidelines
Edited by Daniel Estermann