Host not found in nginx error.log / Gateway error

Hello,

I have a lot of services running and a cname for all in my dns config (bind9). When I open the url in my browser nginx says: 2019/09/03 08:03:06 [error] 368#368: *5 wordpress could not be resolved (3: Host not found)...

nslookup lookes wired but can resolve the hostname:

root@ebcdbc201640:/# nslookup wordpress
nslookup: can’t resolve ‘(null)’: Name does not resolve

Name: wordpress
Address 1: 10.10.10.12 docker2.domain.com`

Ping looks good:

root@ebcdbc201640:/# ping -c 3 wordpress
PING wordpress (10.10.10.12): 56 data bytes
64 bytes from 10.10.10.12: seq=0 ttl=64 time=0.032 ms
64 bytes from 10.10.10.12: seq=1 ttl=64 time=0.056 ms
64 bytes from 10.10.10.12: seq=2 ttl=64 time=0.045 ms

And this is the resolv.conf of my container:

search domain.com
nameserver 127.0.0.11
options ndots:1

Any ideas what I’m doing wrong? Wordpress is just an example and I know, that this isn’t in your configs. I have this issue with all configs I use. I have created a new network to get dns working. All of my cnames (containers) are pingable.

Cheers
Kai