I'm developing a simple web application with springboot in Windows 8.
When I deploy jar file into docker in Ubuntu and run the container, I can see it works on address 10.0.2.15:8082 which is a local IP address, correctly.
What I want is to connect this IP address in my Windows 8 then I will use postman to post some JSON variables etc. But I can't connect 10.0.2.15:8082 from Windows 8.
My VirtualBox adapter attached to NAT and also some rules are given:
I also tried to change host and guest rules otherwise, but didnt work either.
When I run the application in Windows 8 and check it with 192.168.56.1:8082, it gives success and also I can see the same result in Ubuntu with the same address. but can't get it to work otherwise.
I expect to connect ubuntu's localhost in my Windows 8.
I have found the answer;
After shutting down vm, i added second adapter as Host-only Adapter. After starting virtual machine, in terminal by entering "ifconfig" command you can see ip4 address for host-only adapter (in Windows it is Ethernet adapter Virtualbox Host-Only Network). When you try to enter that address in windows and ubuntu, it shows the result.
Also that 192.168.56.1 address is Windows Virtualbox Host-Only Network IPv4 address in my PC.