Error: getaddrinfo ENOTFOUND - can anyone help?

I have installed FF on a raspberry pi through docker.

I don't have a local DNS server set up, so I am using /etc/hosts to manage pointing at the right IP addresses.

I can access the admin system, but when I try to "open editor" on an instance I get

Error: getaddrinfo ENOTFOUND forge.example.com

I have set up so the Raspberry pi can resove this IP address (using /etc/hosts) and if I ping that address from the pi, I can see it.

Is this because I haven't set up a DNS server? I'm really trying to avoid it as I know nothing about DNS, and it's a really steep learning curve

Update: I have now set up pihole and am using that as a dns server. The pi (running flowfuse) is routed through it plus the mac I'm using. I'm still getting the error.