CentOS Linux release 7.4.1708 x86_64
Docker version 17.09.0-ce, build afdb6d4
After some experiments i found that hostname must be a FQDN … Or, at least, have at least one dot in the name.
cont1, cont2 = bad address
cont.1, cont.2 = nslookup ok
container-a, container-b = bad address
web, db = bad address
web.domain, db.domain = nslookup ok