money-rain commited on
Commit
08f7cd4
·
verified ·
1 Parent(s): 9a6118a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -11
Dockerfile CHANGED
@@ -3,29 +3,32 @@ FROM python:3.12-slim
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
- # 1. Installation globale : Node.js 20 + Dépendances Playwright + Nginx
7
- # On fait tout en un seul RUN pour éviter les conflits de cache apt
8
- RUN apt-get update \
9
- && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
10
- && apt-get install -y --no-install-recommends \
11
- ca-certificates g++ gnupg libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 \
12
  libdbus-1-3 libdrm2 libexpat1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 \
13
  libnspr4 libnss3 libpango-1.0-0 libasound2 libx11-6 libx11-xcb1 libxcb1 \
14
  libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \
15
- libxrender1 libxss1 libxtst6 libpangocairo-1.0-0 libpng16-16 wget xvfb nginx curl nodejs \
16
  && rm -rf /var/lib/apt/lists/*
17
 
18
- # 2. Dépendances Python
 
 
 
 
 
 
19
  COPY bot/requirements.txt /app/bot/requirements.txt
20
  RUN pip install --no-cache-dir -r /app/bot/requirements.txt
21
 
22
- # 3. Installation de Playwright Chromium
23
  RUN playwright install chromium
24
 
25
- # 4. Copie des fichiers du Bot
26
  COPY bot/ /app/bot/
27
 
28
- # 5. Permissions et dossier de persistance HF
29
  RUN chmod +x /app/start.sh
30
  RUN mkdir -p /data && chmod 777 /data
31
 
 
3
 
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
+ # 1. Dépendances système (Uniquement les libs Playwright + Nginx)
7
+ RUN apt-get update && apt-get install -y --no-install-recommends \
8
+ ca-certificates g++ libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 \
 
 
 
9
  libdbus-1-3 libdrm2 libexpat1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 \
10
  libnspr4 libnss3 libpango-1.0-0 libasound2 libx11-6 libx11-xcb1 libxcb1 \
11
  libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \
12
+ libxrender1 libxss1 libxtst6 libpangocairo-1.0-0 libpng16-16 wget xvfb nginx curl \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # 2. Installation de Node.js 20 (Méthode binaire officielle, bypass apt)
16
+ RUN curl -fsSL https://nodejs.org/dist/v20.11.0/node-v20.11.0-linux-x64.tar.xz -o /tmp/node.tar.xz \
17
+ && tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 \
18
+ && rm -f /tmp/node.tar.xz \
19
+ && node -v && npm -v
20
+
21
+ # 3. Dépendances Python
22
  COPY bot/requirements.txt /app/bot/requirements.txt
23
  RUN pip install --no-cache-dir -r /app/bot/requirements.txt
24
 
25
+ # 4. Installation de Playwright Chromium
26
  RUN playwright install chromium
27
 
28
+ # 5. Copie des fichiers du Bot
29
  COPY bot/ /app/bot/
30
 
31
+ # 6. Permissions et dossier de persistance HF
32
  RUN chmod +x /app/start.sh
33
  RUN mkdir -p /data && chmod 777 /data
34