fix: Dockerfile ffmpeg-fetch + drop ffprobe + suppress TimeoutNegativeWarning

- ffmpeg-fetch Stage war versehentlich leer (sed-Fehler) - jetzt korrekt
- ffprobe entfernt (wird nirgends benutzt, spart ~200MB)
- TimeoutNegativeWarning aus @discordjs/voice unterdrueckt (Node 24 Kompatibilitaet)
This commit is contained in:
Claude Code 2026-03-05 15:31:25 +01:00
parent 4884691e7d
commit 546d28c8fa
2 changed files with 1620 additions and 1611 deletions

View file

@ -6,7 +6,6 @@ WORKDIR /app/web
COPY web/package*.json ./ COPY web/package*.json ./
RUN npm install --no-audit --no-fund RUN npm install --no-audit --no-fund
COPY web/ . COPY web/ .
# Umgebungsvariable für React Build verfügbar machen (Vite liest nur VITE_*)
ARG VITE_BUILD_CHANNEL=stable ARG VITE_BUILD_CHANNEL=stable
ARG VITE_APP_VERSION=1.1.0 ARG VITE_APP_VERSION=1.1.0
ENV VITE_BUILD_CHANNEL=$VITE_BUILD_CHANNEL ENV VITE_BUILD_CHANNEL=$VITE_BUILD_CHANNEL
@ -21,12 +20,18 @@ COPY server/package*.json ./
RUN npm install --no-audit --no-fund RUN npm install --no-audit --no-fund
COPY server/ . COPY server/ .
RUN npm run build RUN npm run build
# Nur Prod-Dependencies für Runtime behalten. rm -rf and cleanly install to prevent npm prune bugs
RUN rm -rf node_modules && npm install --omit=dev --no-audit --no-fund RUN rm -rf node_modules && npm install --omit=dev --no-audit --no-fund
# --- Static ffmpeg binary (kein apt-get, keine Codec-Libs noetig) --- # --- Static ffmpeg binary (nur ffmpeg, kein ffprobe - wird nicht benutzt) ---
FROM debian:bookworm-slim AS ffmpeg-fetch FROM debian:bookworm-slim AS ffmpeg-fetch
RUN apt-get update && apt-get install -y curl xz-utils ca-certificates && rm -rf /var/lib/apt/lists/* && curl -L https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz -o /tmp/ffmpeg.tar.xz && mkdir -p /tmp/ffmpeg && tar -xJf /tmp/ffmpeg.tar.xz -C /tmp/ffmpeg --strip-components=2 --wildcards '*/bin/ffmpeg' '*/bin/ffprobe' && chmod +x /tmp/ffmpeg/ffmpeg /tmp/ffmpeg/ffprobe && rm /tmp/ffmpeg.tar.xz RUN apt-get update && apt-get install -y --no-install-recommends curl xz-utils ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& curl -L https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz \
-o /tmp/ffmpeg.tar.xz \
&& mkdir -p /tmp/ffmpeg \
&& tar -xJf /tmp/ffmpeg.tar.xz -C /tmp/ffmpeg --strip-components=2 --wildcards "*/bin/ffmpeg" \
&& chmod +x /tmp/ffmpeg/ffmpeg \
&& rm /tmp/ffmpeg.tar.xz
# --- Runtime image --- # --- Runtime image ---
FROM node:24-slim AS runtime FROM node:24-slim AS runtime
@ -35,13 +40,12 @@ ENV NODE_ENV=production
ENV PORT=8080 ENV PORT=8080
ENV SOUNDS_DIR=/data/sounds ENV SOUNDS_DIR=/data/sounds
# Nur ca-certificates fuer HTTPS + yt-dlp (kein ffmpeg via apt!) RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl \
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp && chmod a+rx /usr/local/bin/yt-dlp && apt-get purge -y curl && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* && curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp \
&& chmod a+rx /usr/local/bin/yt-dlp \
&& apt-get purge -y curl && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
# Statische ffmpeg/ffprobe Binaries aus fetch-stage kopieren
COPY --from=ffmpeg-fetch /tmp/ffmpeg/ffmpeg /usr/local/bin/ffmpeg COPY --from=ffmpeg-fetch /tmp/ffmpeg/ffmpeg /usr/local/bin/ffmpeg
COPY --from=ffmpeg-fetch /tmp/ffmpeg/ffprobe /usr/local/bin/ffprobe
COPY --from=server-build /app/server/dist ./server/dist COPY --from=server-build /app/server/dist ./server/dist
COPY --from=server-build /app/server/node_modules ./server/node_modules COPY --from=server-build /app/server/node_modules ./server/node_modules
COPY --from=server-build /app/server/package.json ./server/package.json COPY --from=server-build /app/server/package.json ./server/package.json

File diff suppressed because it is too large Load diff