There are certain features, like JavaScript service workers without https, that only work on localhost, but when I run my app inside a docker container, using docker-compose
The easiest way is to make port forwarding from the VBox
Settings->Network->Adapter 1->Port Forwarding
then add Name, in host add 127.0.0.1(for local host) then proper port bindings and restart the VM.