diff options
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 24 |
1 files changed, 10 insertions, 14 deletions
@@ -1,19 +1,15 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build -WORKDIR /app - -COPY . ./ -RUN dotnet restore -RUN dotnet tool restore -RUN dotnet libman restore -RUN dotnet ef database update --context DataContext -RUN dotnet ef database update --context IdentityContext +FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build +WORKDIR /source -RUN dotnet publish -c Release -o out +COPY . . +RUN dotnet restore && \ + dotnet tool restore && \ + dotnet libman restore +RUN dotnet publish --property:OutputPath=/app -FROM mcr.microsoft.com/dotnet/aspnet:6.0 +FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy EXPOSE 5000 WORKDIR /app -COPY --from=build /app/out . -COPY --from=build /app/Database ./Database +COPY --from=build /app . ENV ASPNETCORE_ENVIRONMENT Production -ENTRYPOINT [ "dotnet", "MyDarling.dll", "--urls=http://0.0.0.0:5000" ]
\ No newline at end of file +ENTRYPOINT [ "./MyDarling", "--urls=http://0.0.0.0:5000" ] |