Open garyfeng opened 4 years ago
In the case of a Win host machine, we are looking for
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter
Physical Address. . . . . . . . . : 0A-00-27-00-00-08
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::2559:28de:a4a7:6b8c%8(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 369754151
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-25-07-E7-24-9C-5C-8E-86-C1-3F
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled
In some cases when we use
docker-compose
, services may rejectlocalhost
and require a real IP address for the host.The following script can be used to get it: https://bash.cyberciti.biz/misc-shell/read-local-ip-address/