I'm trying to map a hostname to a ip address on a lxc container because the hostname will not be resolvable by DNS.
The lxc.conf of the container contains lxc.mount.entry = /sas/mycontainer/etc/hosts etc/hosts none ro,bind 0 0
. Insinde the hosts file I have my ip-hostname mapping: 192.168.0.3 foo.derp
To test the setup I ran lxc-attach -n mycontainer -- openssl s_client -connect foo.derp:636
which returns
gethostbyname failure
connect:errno=0
I also tried to configure the mapping on the lxc host.