mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-24 15:38:10 +02:00
fix: switch back to Debian-slim for native glibc (posix_fallocate64 fix)
Alpine + gcompat lacks posix_fallocate64 symbol required by Remotion's Chrome headless shell. Debian-slim has real glibc so Chrome runs correctly. NODE_OPTIONS stays before npm install to prevent OOM during build. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
eba9c9da5e
commit
57c18e24df
1 file changed
+36
-17
+36
-17
@@ -1,26 +1,46 @@
|
|||||||
# Alpine léger + gcompat pour la compatibilité glibc (requis par Remotion Chrome headless)
|
# Debian slim — glibc requis par le Chrome headless shell de Remotion (posix_fallocate64, etc.)
|
||||||
FROM node:20-alpine
|
FROM node:20-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Augmenter la mémoire dès le début (npm install + build)
|
# Augmenter la mémoire AVANT npm install + build (évite OOM sur les grosses dépendances)
|
||||||
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
||||||
|
|
||||||
# Dépendances système
|
# Dépendances système : build tools, canvas/sharp, fonts, ffmpeg + dépendances Chrome
|
||||||
RUN apk add --no-cache \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
python3 make g++ \
|
python3 make g++ \
|
||||||
cairo-dev jpeg-dev pango-dev giflib-dev pixman-dev \
|
libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev libpixman-1-dev \
|
||||||
vips-dev pkgconfig \
|
libvips-dev pkg-config \
|
||||||
ttf-dejavu fontconfig \
|
fonts-dejavu-core fontconfig \
|
||||||
curl tar bzip2 \
|
curl tar bzip2 \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
libcap \
|
libcap2-bin \
|
||||||
# gcompat = couche de compatibilité glibc → permet au Chrome headless de Remotion de tourner sur Alpine
|
ca-certificates \
|
||||||
gcompat \
|
# Dépendances Chrome headless
|
||||||
libc6-compat \
|
libasound2 \
|
||||||
# Dépendances Chromium pour le rendu headless
|
libatk-bridge2.0-0 \
|
||||||
chromium \
|
libatk1.0-0 \
|
||||||
nss freetype harfbuzz ca-certificates
|
libcups2 \
|
||||||
|
libdbus-1-3 \
|
||||||
|
libdrm2 \
|
||||||
|
libgbm1 \
|
||||||
|
libglib2.0-0 \
|
||||||
|
libgtk-3-0 \
|
||||||
|
libnspr4 \
|
||||||
|
libnss3 \
|
||||||
|
libpango-1.0-0 \
|
||||||
|
libx11-6 \
|
||||||
|
libx11-xcb1 \
|
||||||
|
libxcb1 \
|
||||||
|
libxcomposite1 \
|
||||||
|
libxdamage1 \
|
||||||
|
libxext6 \
|
||||||
|
libxfixes3 \
|
||||||
|
libxkbcommon0 \
|
||||||
|
libxrandr2 \
|
||||||
|
libxshmfence1 \
|
||||||
|
libxtst6 \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copier les fichiers de configuration
|
# Copier les fichiers de configuration
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
@@ -52,8 +72,7 @@ RUN rm -rf client/node_modules \
|
|||||||
# Pré-bundler la composition Remotion
|
# Pré-bundler la composition Remotion
|
||||||
RUN node scripts/prebundle-remotion.js || true
|
RUN node scripts/prebundle-remotion.js || true
|
||||||
|
|
||||||
# Télécharger le Chrome headless shell de Remotion
|
# Télécharger le Chrome headless shell de Remotion (binaire glibc natif sur Debian)
|
||||||
# gcompat permet au binaire glibc de tourner sur Alpine
|
|
||||||
RUN npx remotion browser ensure && echo "✓ Remotion browser prêt"
|
RUN npx remotion browser ensure && echo "✓ Remotion browser prêt"
|
||||||
|
|
||||||
# Exposer le port
|
# Exposer le port
|
||||||
|
|||||||
Reference in new issue
Block a user