Some checks failed
		
		
	
	Optimized Build and Deploy / remote-build-and-deploy (push) Failing after 11s
				
			
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			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
 | |
| 
 | |
| # Instala dependencias optimizadas
 | |
| RUN apt-get update && apt-get install -y --no-install-recommends \
 | |
|     libgbm1 libgconf-2-4 libgdk-pixbuf2.0-0 libgtk-3-0 \
 | |
|     libnss3 libxss1 libasound2 libxtst6 \
 | |
|     ca-certificates fonts-liberation lsb-release xdg-utils wget \
 | |
|     && rm -rf /var/lib/apt/lists/*
 | |
| 
 | |
| COPY --from=publish /app/publish .
 | |
| 
 | |
| EXPOSE 8080
 | |
| ENTRYPOINT ["dotnet", "GestionIntegral.Api.dll"] |