Unable to connect spring boot service from docker container in WSL2
tried below steps:
tried connection with ipv4, NAT but doesn't help
tried solution from
https://superuser.com/questions/1732399/cannot-communicate-with-windows-localhost-from-wsl2
- get the IP from
echo $(host hostname --long
| grep -oP '(\s)\d+(.\d+){3}' | tail -1 | awk '{ print $NF }' | tr -d '\r')
curl -I http://<ip_from_abv_cmd>:9003/health_check
//Connection timed out
Please help. TIA
CMD ["node", "/app/runtime/server.js"]