Resurrecting this thread in hopes that the knowledgeable commenters may be able to help me out as well.
I am getting the same error as the original OP
Currently running Unraid and have a container running Nginix Proxy Manager. Firewall ports configured to send all port 80/443 traffic to my NPM container. I have successfully set up many docker containers with my NPM container and all has worked well.
I installed a UbuntuServer VM, went though initial config, setup static IP for the VM, installed docker, then downloaded discourse, but failed on the setup script just as the OP.
I posted more info on the following thread: Discourse installed in UNRAID Ubuntu Server VM behind NPM reverse proxy not resolving hostname
I feel as though it has gone stale, or at least no true resolution has been met. Any help would be gratefully appreciated.