Docker starts with https://localhost:0/swagger

83 views Asked by At

I'm trying to run .Net 7 simple application with docker

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
EXPOSE 80
WORKDIR /src
COPY . .
RUN dotnet restore 
RUN dotnet publish -c Release -o /app/publish

FROM mcr.microsoft.com/dotnet/aspnet:7.0    
EXPOSE 80

WORKDIR /app
COPY --from=build-env /app/publish .


ENTRYPOINT ["dotnet", "CourierService.dll"]

But is simply got redirected to https://localhost:0/swagger

I'm running it from Vs on Docker Desktop that configured on Linux, when i'm openning docker desktop, I see that container exists:

enter image description here

But when i'm trying to click on mentioned url i got redirected to 404 page like it was never existed, and the odd thing that about 2 months ago it worked fine and had no issues at all, can someone tell me what hapenned, why it behaves so strange way?

And it's the trace that i got from output

[11:11:34] level=debug traceID= requestID= Hosting starting
[11:11:34] level=debug traceID= requestID= Using development certificate: CN=localhost (Thumbprint: B990ECE9DA37AE025931FC26600F87A672012D99)
[11:11:34] level=information traceID= requestID= Now listening on: https://[::]:443
[11:11:34] level=information traceID= requestID= Now listening on: http://[::]:80
[11:11:34] level=debug traceID= requestID= Loaded hosting startup assembly CourierService
[11:11:34] level=information traceID= requestID= Application started. Press Ctrl+C to shut down.
[11:11:34] level=information traceID= requestID= Hosting environment: Development
[11:11:34] level=information traceID= requestID= Content root path: /app
[11:11:34] level=debug traceID= requestID= Hosting started
0

There are 0 answers