I dockerized a .net core 2.2 web api application in Visual Studio 2017 successfully. One part of this application is supposed to store some data to Azure Storage Emulator running on the same machine as VS 2017 is running on. The emulator's configuration looks like below:
<services>
<service name="Blob" url="http://127.0.0.1:10000/"/>
<service name="Queue" url="http://127.0.0.1:10001/"/>
<service name="Table" url="http://127.0.0.1:10002/"/>
</services>
docker-compose.yml file has the following network definition:
build:
context: .
dockerfile: MyWebApi\Dockerfile
network: host
I am able to view the web api's output at https://127.0.0.1:44315/api/values
Per my understanding, "host" network configuration did its job by assigning the container's host's IP address to the container which seems good so far. The question is that why the dockerized web app in the container fails to communicate with the emulator in spite of the mentioned configuration. What is missing in this exercise?