FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY api_cs.csproj .
RUN dotnet restore api_cs.csproj
COPY . .
RUN dotnet build api_cs.csproj -c $BUILD_CONFIGURATION -o /app/build
RUN dotnet publish api_cs.csproj -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
CMD ["dotnet", "/app/publish/api_cs.dll"]
