Files
dmolinari a5bcbefa52
All checks were successful
Optimized Build and Deploy / remote-build-and-deploy (push) Successful in 7m36s
Try con QuestPDF
Se elimina Puppeteer y Chromium. Se utiliza QuestPDF para mayor velocidad y sin Razor.
2025-06-20 19:04:23 -03:00

29 lines
845 B
Docker

# --- Etapa 1: Build ---
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
# Copia solo los archivos de proyecto primero para cachear dependencias
COPY GestionIntegralWeb.sln .
COPY Backend/GestionIntegral.Api/GestionIntegral.Api.csproj Backend/GestionIntegral.Api/
# Restaura dependencias
RUN dotnet restore "GestionIntegralWeb.sln"
# Copia el resto del código
COPY . .
# Construye el proyecto
WORKDIR "/src/Backend/GestionIntegral.Api"
RUN dotnet build "GestionIntegral.Api.csproj" -c Release -o /app/build
# --- Etapa 2: Publish ---
FROM build AS publish
RUN dotnet publish "GestionIntegral.Api.csproj" -c Release -o /app/publish /p:UseAppHost=false
# --- Etapa 3: Final ---
FROM mcr.microsoft.com/dotnet/aspnet:9.0
WORKDIR /app
COPY --from=publish /app/publish .
EXPOSE 8080
ENTRYPOINT ["dotnet", "GestionIntegral.Api.dll"]