From 3bc7c6ad3b87a79487ad3202ef047ac1973469fd Mon Sep 17 00:00:00 2001 From: DanielS Date: Mon, 22 Jun 2026 23:24:58 +0200 Subject: [PATCH] Make Dockerfile tolerant to missing config files --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2b6299d..11c926a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,13 +22,15 @@ FROM node:20-alpine AS runner WORKDIR /app # Copy only the built assets and runtime dependencies from the builder +# Copy only built assets and runtime dependencies COPY --from=builder /app/.next ./.next COPY --from=builder /app/public ./public COPY --from=builder /app/package*.json ./ -COPY --from=builder /app/next.config.mjs ./ -COPY --from=builder /app/next-env.d.ts ./ -COPY --from=builder /app/tsconfig.json ./ - +# KORREKTUR: Flexibles Kopieren der Next-Konfiguration (egal ob .js oder .mjs) +COPY --from=builder /app/next.config.* ./ +# Optionale TS-Dateien (nur kopieren, wenn vorhanden, blockiert den Build nicht mehr) +COPY --from=builder /app/tsconfig.json ./ 2>/dev/null || true +COPY --from=builder /app/next-env.d.ts ./ 2>/dev/null || true # Install production dependencies (already installed in builder, but ensure they are present) RUN npm ci --omit=dev