Supervised Installation on Ubuntu Server 20.04.1 LTS - DNS inside Docker Container

Hi all

blahblah about what i did:
After about two years running hassio on a raspberry pi3 i thought its time for a change. I read, that it’s not the question if the sd-card breaks, but only when. so i bought a low level nuc and because i also read, that if i curious about learning new stuff, i should go with an installation in docker.

well, the installation worked without problems accordin to this guide. Thanks Jason!
After the clean install i installed samba, loaded the snapshot on the new server and after a short restore all my stuff was working.
But then i realized, that my mqtt-broker (core mosquitto) didnt work properly. the problem was, that it was not connected to homeassistant using the internal ip-address of homeassistant, but instead the duckdns-address ( Altough i have the dnsmasq-addon running, inside the docker container it resolves my duckdns-address to my external ip. inside my lan its no problem and the duckdns-address is translated in the lan-ip from dnsmasq.

the problem:
to get dnsmasq-addon started, i had to stop the systemd-resolved service which was blocking port 53. after that dnsmasq started and works.
when i enter the lan-ip of my server in mosquitto and in my mqtt-nodes in nodered, everything works.
perfect! where is the problem?
well its not a big problem, but with hassos, which i had before, i could use my duckdns-domain also inside the containers. why isn’t this working inside the containers running on ubuntu server 20?

i already tried entering my server-ip as dns-server in daemon.json. but after that docker wasn’t able to start again, so i had to remove it again.

has anyone a solution for my “problem” or i would also appreciate an explanation, why this isn’t working again with my new setup.

thanks for your support!