Modified appsettings.json based on ip configured in host file.
10.xx.xx.x host.docker.internal
"Elasticsearch": {
"ConnectionString": "http://10.xx.xx.x:9200/",
"Username": null,
"Password": null,
"Prefix": "test-",
"Synonym": {
"Server": "http://10.xx.xx.x:9210",
"ApiKey": null
}
}
This solved the issue.
@patric.forsgard thanks for the help.