In order to expose a container outside of the host, you need to setup the NATing table on the VM. Here is an example of some mappings
Navigating to NAT table on Virtual Box
Select Network
Expand the Advanced button
Select Port Forwarding
You can now do your settings
Understanding the NAT Table
Each row must have unique name.
Select the protocol to monitor (TCP as default).
Specify the IP address on the host to listen on.
Specify the port number on the host for the corresponding IP address to listen on.
For the next step, consider the following result of docker ps
Docker is running on Windows Home OS, so it is Docker ToolBox. docker machine IP is 192.168.99.100.
There are two tomcat 9 instances running, one called t9s and the is called t9s-hanc. There is a MySQL instance called mysql-hanc.