I am running a microservice inside a docker container using docker compose. The docker-compose.yml file is as follows.
version: '2.1'
services:
flousermanagement:
build:
context: ../FloUserManagement/bin/Debug/netcoreapp2.0/publish
dockerfile: Dockerfile
ports:
- "5001:5001"
- "8080:8080"
volumes:
-
../FloUserManagement/bin/Debug/netcoreapp2.0/publish/data:
c:\floUserManagement\data
The dockerfile.
FROM microsoft/dotnet:2.0.0-preview2-sdk-nanoserver
ENTRYPOINT ["dotnet", "FloUserManagement.dll"]
ARG source=.
WORKDIR /floUserManagement
ENV ASPNETCORE_URLS http://+:5001
EXPOSE 5001
EXPOSE 8080
COPY $source .
I am unable to connect to locahost. The code running without the container works just fine but not within the container. I tried tracking the requests on the container but I am not able to hit any endpoints inside the container on locahost:5000.
Is it due to the dotnet core 2.0.0-preview2 version upgrade? Is it due to localhost not getting mapped in IPv6 from IPv4? What could be the workaround for this?
I am running docker enterprise edition on azure vm. Windows Server 2016 datacenter Intel Xeon 2.4GHz Dual Core. x64 bit 7GB RAM. I am using Docker enterprise and not the community edition.