From f4601b7520d44ddd689b631f4c23f4e9699489b2 Mon Sep 17 00:00:00 2001 From: dmolinari Date: Thu, 19 Jun 2025 10:21:47 -0300 Subject: [PATCH] =?UTF-8?q?Reversi=C3=B3n.=20Se=20a=C3=B1ade=20GDIPlus=20p?= =?UTF-8?q?ara=20reportes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Reportes/ReportesController.cs | 4 ++-- Backend/GestionIntegral.Api/Dockerfile | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Backend/GestionIntegral.Api/Controllers/Reportes/ReportesController.cs b/Backend/GestionIntegral.Api/Controllers/Reportes/ReportesController.cs index 8d0597a..af878c9 100644 --- a/Backend/GestionIntegral.Api/Controllers/Reportes/ReportesController.cs +++ b/Backend/GestionIntegral.Api/Controllers/Reportes/ReportesController.cs @@ -958,8 +958,8 @@ namespace GestionIntegral.Api.Controllers var parameters = new List { - new ReportParameter("FechaDesde", fechaDesde.ToString("yyyy-MM-dd")), - new ReportParameter("FechaHasta", fechaHasta.ToString("yyyy-MM-dd")) + new ReportParameter("FechaDesde", fechaDesde.ToString("dd/MM/yyyy")), + new ReportParameter("FechaHasta", fechaHasta.ToString("dd/MM/yyyy")) }; report.SetParameters(parameters); diff --git a/Backend/GestionIntegral.Api/Dockerfile b/Backend/GestionIntegral.Api/Dockerfile index 4a9f1db..c025405 100644 --- a/Backend/GestionIntegral.Api/Dockerfile +++ b/Backend/GestionIntegral.Api/Dockerfile @@ -27,6 +27,16 @@ RUN dotnet publish "GestionIntegral.Api.csproj" -c Release -o /app/publish /p:Us # Usamos la imagen de runtime de ASP.NET, que es mucho más ligera que el SDK. FROM mcr.microsoft.com/dotnet/aspnet:9.0 WORKDIR /app + +# La imagen mcr.microsoft.com/dotnet/aspnet:9.0 está basada en Debian. +# Necesitamos instalar libgdiplus para que System.Drawing y el motor de reportes funcionen. +# Cambiamos temporalmente a usuario root para instalar paquetes. +USER root +RUN apt-get update && apt-get install -y libgdiplus libc6-dev && rm -rf /var/lib/apt/lists/* +# Volvemos al usuario por defecto de la aplicación (usualmente 'app'). +# Si tu imagen no define un usuario, esta línea puede ser opcional, pero es buena práctica. +USER app + COPY --from=publish /app/publish . # El puerto en el que la API escuchará DENTRO del contenedor.