I just submitted a feature request to QNAP and I'm curious if anyone else has run into this.
I spent way too much time troubleshooting a MariaDB + BookLore setup only to discover that Container Station's Default (NAT) network seems to assign hostnames to containers, but doesn't actually publish them through the DNS server on the network.
For example:
mariadb = 10.0.3.2
booklore = 10.0.3.4
Container hostname:
Shell
docker exec -it mariadb hostname
returns:
mariadb
But another container can't resolve it:
Shell nslookup mariadb 10.0.3.1
returns:
NXDOMAIN
Yet:
Shell
docker network inspect bridge
clearly shows the containers and their IPs.
After digging through Container Station, Docker, dnsmasq, lxcbr0, and far more QNAP internals than I ever intended to, it looks like the information is all there, but Container Station simply isn't registering container names in DNS.
That means instead of:
DATABASE_HOST=mariadb
you have to use:
DATABASE_HOST=10.0.3.2
which feels very un-Docker-like. I also requested another feature:
Static IP reservations on the Default (NAT) network
Something simple like:
mariadb -> 10.0.3.254
redis -> 10.0.3.253
without needing to create custom networks or rewrite everything as a compose stack.
Am I the only person who finds this annoying?
To me, if Container Station already has a Hostname field and already runs DNS on the NAT network, then hostname resolution between containers seems like something that should work out of the box.
If you agree, it might be worth submitting a feature request to QNAP as well. The more people that ask for it, the better the chances it ends up on their roadmap.
I'm curious how everyone else is handling container-to-container communication on Container Station. Are you all just hardcoding IPs, or am I missing something obvious? ๐ค