project: update Dockerfile

This commit is contained in:
vchikalkin 2023-05-05 12:00:05 +03:00
parent e5e5bdebe0
commit 94d95a939f
2 changed files with 7 additions and 2 deletions

View File

@ -2,6 +2,11 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
WORKDIR /build WORKDIR /build
COPY . . COPY . .
COPY ./NuGet.Config /nuget.config
COPY ./evoleasing_25.crt /etc/ssl/certs
RUN update-ca-certificates
RUN dotnet restore RUN dotnet restore
RUN dotnet publish -c Release -o /app RUN dotnet publish -c Release -o /app
# Stage 2 # Stage 2
@ -9,6 +14,6 @@ FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS final
WORKDIR /app WORKDIR /app
COPY --from=build /app . COPY --from=build /app .
EXPOSE 2121 EXPOSE 5000
ENTRYPOINT ["dotnet", "ELT.dll"] ENTRYPOINT ["dotnet", "ELT.dll"]

View File

@ -16,7 +16,7 @@ namespace ELT
.ConfigureWebHostDefaults(webBuilder => .ConfigureWebHostDefaults(webBuilder =>
{ {
webBuilder.UseStartup<Startup>(); webBuilder.UseStartup<Startup>();
webBuilder.UseKestrel(options => { options.ListenAnyIP(2121); }); webBuilder.UseKestrel(options => { options.ListenAnyIP(5000); });
}); });
} }
} }