I'm trying to publish a web api on docker based on docker.
I'm using a docker file with the following content :
FROM microsoft/dotnet
COPY . /dotnetapp
WORKDIR /dotnetapp
RUN dotnet restore
EXPOSE 5000
ENTRYPOINT dotnet run
I can build and run the image but i'm not able to acces to web api.
Seems like you have to specify which URL Kestrel will listen to otherwise it won't accept any connection outside same container.
So your ENTRYPOINT should be something like
Reference https://www.sesispla.net/blog/language/en/2016/05/running-asp-net-core-1-0-rc2-in-docker/