Unable to access ERPNext on VM

Hi there,

I am trying to install the frappe_docker for a production environment on Ubuntu 20.4 VM.

Host Machine: Mac OSX
VM: Ubuntu 20.4 LTS headless installed on VirtualBox

Steps taken to install ERPNext on the VM:

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
git clone https://github.com/frappe/frappe_docker.git
cd frappe_docker 
vi env-production

LETSENCRYPT_EMAIL=info@abc.com
ERPNEXT_VERSION=edge
FRAPPE_VERSION=edge
MARIADB_HOST=mariadb
MYSQL_ROOT_PASSWORD=admin
SITE_NAME=erp.abc.com
SITES=`erp.abc.com`
DB_ROOT_USER=root
ADMIN_PASSWORD=admin
INSTALL_APPS=erpnext
.......

cp env-production .env
sudo apt install docker-compose -y
docker-compose up -d

I then add this to the hostile entry: (in /etc/hosts of the VM)
127.0.0.1 erp.abc.com

When tried the curl it still says
curl: (7) Failed to connect to erp.abc.com port 443: Connection refused

I also tried to access using the IP, same outcome.

Any idea what I could be missing here?

Update on my previous post. I mistakenly mentioned that with the above installation procedure it didn’t work within the VM that’s not true. It works on the VM. The issue is I can’t seem to access it on the Host computer.

Would really appreciate a response on this.

Check your network Adapter(s).
Google or look at Youtube videos to find the answer.