Update docker

This commit is contained in:
2025-11-09 04:55:30 +07:00
parent 747bda2700
commit 009de85240

View File

@@ -1,11 +1,11 @@
# Use the official Microsoft .NET runtime as the base image (no ASP.NET needed for console worker) # Use the official Microsoft ASP.NET Core runtime as the base image (required for Host.CreateDefaultBuilder)
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app WORKDIR /app
# Use the official Microsoft .NET SDK image to build the code. # Use the official Microsoft .NET SDK image to build the code.
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /buildapp WORKDIR /buildapp
COPY ["/src/Managing.Workers/Managing.Workers.csproj", "Managing.Workers/"] COPY ["/src/Managing.Workers.Api/Managing.Workers.csproj", "Managing.Workers.Api/"]
COPY ["/src/Managing.Bootstrap/Managing.Bootstrap.csproj", "Managing.Bootstrap/"] COPY ["/src/Managing.Bootstrap/Managing.Bootstrap.csproj", "Managing.Bootstrap/"]
COPY ["/src/Managing.Application/Managing.Application.csproj", "Managing.Application/"] COPY ["/src/Managing.Application/Managing.Application.csproj", "Managing.Application/"]
COPY ["/src/Managing.Application.Abstractions/Managing.Application.Abstractions.csproj", "Managing.Application.Abstractions/"] COPY ["/src/Managing.Application.Abstractions/Managing.Application.Abstractions.csproj", "Managing.Application.Abstractions/"]
@@ -17,9 +17,9 @@ COPY ["/src/Managing.Infrastructure.Exchanges/Managing.Infrastructure.Exchanges.
COPY ["/src/Managing.Infrastructure.Messengers/Managing.Infrastructure.Messengers.csproj", "Managing.Infrastructure.Messengers/"] COPY ["/src/Managing.Infrastructure.Messengers/Managing.Infrastructure.Messengers.csproj", "Managing.Infrastructure.Messengers/"]
COPY ["/src/Managing.Infrastructure.Storage/Managing.Infrastructure.Storage.csproj", "Managing.Infrastructure.Storage/"] COPY ["/src/Managing.Infrastructure.Storage/Managing.Infrastructure.Storage.csproj", "Managing.Infrastructure.Storage/"]
COPY ["/src/Managing.Infrastructure.Web3/Managing.Infrastructure.Evm.csproj", "Managing.Infrastructure.Web3/"] COPY ["/src/Managing.Infrastructure.Web3/Managing.Infrastructure.Evm.csproj", "Managing.Infrastructure.Web3/"]
RUN dotnet restore "/buildapp/Managing.Workers/Managing.Workers.csproj" RUN dotnet restore "/buildapp/Managing.Workers.Api/Managing.Workers.csproj"
COPY . . COPY . .
WORKDIR "/buildapp/src/Managing.Workers" WORKDIR "/buildapp/src/Managing.Workers.Api"
RUN dotnet build "Managing.Workers.csproj" -c Release -o /app/build RUN dotnet build "Managing.Workers.csproj" -c Release -o /app/build
FROM build AS publish FROM build AS publish