Fix: Ottimizzato Dockerfile e risolto timeout push registry Gitea
Build and Push Docker Images / Build Windows Container (push) Successful in 7s
Build and Push Docker Images / Create Multi-Platform Manifest (push) Has been cancelled
Build and Push Docker Images / Build Linux Container (push) Has been cancelled

- Migrato immagine runtime da Debian a Alpine (riduzione ~60% dimensione)
- Aggiunto suffisso -linux ai tag per manifest multi-platform
- Disabilitate attestations/provenance per ridurre overhead push
- Implementato retry automatico in caso di fallimento push
- Corretto utilizzo apk invece di apt-get per Alpine Linux

Risolve: HTTP 524 timeout durante push immagini al registry
This commit was merged in pull request #7.
This commit is contained in:
2026-01-25 17:16:53 +01:00
parent 5cdad7fb7d
commit 81fce773a9
2 changed files with 22 additions and 5 deletions
+8 -5
View File
@@ -24,17 +24,20 @@ RUN dotnet build "Data_Coupler.csproj" -c Release -o /app/build
# Stage 2: Publish
FROM build AS publish
RUN dotnet publish "Data_Coupler.csproj" -c Release -o /app/publish /p:UseAppHost=false
RUN dotnet publish "Data_Coupler.csproj" -c Release -o /app/publish \
/p:UseAppHost=false \
/p:PublishTrimmed=false \
/p:PublishSingleFile=false
# Stage 3: Runtime
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS final
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final
WORKDIR /app
# Installa le dipendenze necessarie per ExcelDataReader e altre librerie
RUN apt-get update && apt-get install -y \
RUN apk add --no-cache \
libgdiplus \
libc6-dev \
&& rm -rf /var/lib/apt/lists/*
icu-libs \
&& rm -rf /var/cache/apk/*
# Crea la directory per il database con i permessi corretti
RUN mkdir -p /var/lib/Data_Coupler && \