New site doesn't resolve on localhost in Docker

I have deployed a production instance of ERPNext in Docker using the easy install script. This runs as expected on localhost on erpnext.localhost, the default site I specified while running the script.

Now, I wanted to host helpdesk on another site helpdesk.localhost. I used the official site operations documentation to setup new site. However, that URL gives 404 not found.

I referred the DNS based multitenancy documentation for bench, however, that seems to be targeted towards bare metal installation. Same seems to be the case for the add-to-hosts command I found here. I am not sure whether I have to manually edit my /etc/hosts file in my local machine.

In general, I think I am getting a bit lost in the difference of implementation for local installation vs Docker. The documentation for the former seems to be a lot more comprehensive. Any clarification on the same will be welcome.

If I did understand your post well you are trying to create a new site in a docker container to work side by side with erpnext.localhost. If so you should know that you can not, a container is just an environment that gives your app what it needs to up and run, it’s not a VM. You can do that manually. refer to containers VS VMs