Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +20 -8
Dockerfile
CHANGED
|
@@ -3,7 +3,13 @@ FROM node:20-alpine
|
|
| 3 |
USER root
|
| 4 |
|
| 5 |
# ============================================
|
| 6 |
-
# 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# ============================================
|
| 8 |
RUN apk add --no-cache \
|
| 9 |
ca-certificates \
|
|
@@ -12,11 +18,10 @@ RUN apk add --no-cache \
|
|
| 12 |
curl \
|
| 13 |
wget
|
| 14 |
|
| 15 |
-
# Mettre à jour les certificats
|
| 16 |
RUN update-ca-certificates
|
| 17 |
|
| 18 |
# ============================================
|
| 19 |
-
#
|
| 20 |
# ============================================
|
| 21 |
RUN apk add --no-cache \
|
| 22 |
git python3 py3-pip make g++ build-base \
|
|
@@ -24,7 +29,7 @@ RUN apk add --no-cache \
|
|
| 24 |
postgresql-client ffmpeg yt-dlp
|
| 25 |
|
| 26 |
# ============================================
|
| 27 |
-
#
|
| 28 |
# ============================================
|
| 29 |
RUN apk add --no-cache \
|
| 30 |
pandoc \
|
|
@@ -34,7 +39,7 @@ RUN apk add --no-cache \
|
|
| 34 |
libreoffice-calc
|
| 35 |
|
| 36 |
# ============================================
|
| 37 |
-
#
|
| 38 |
# ============================================
|
| 39 |
RUN apk add --no-cache \
|
| 40 |
chromium \
|
|
@@ -55,15 +60,22 @@ ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
|
| 55 |
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
| 56 |
|
| 57 |
# ============================================
|
| 58 |
-
#
|
| 59 |
# ============================================
|
| 60 |
RUN npm install -g n8n@latest
|
| 61 |
|
| 62 |
# ============================================
|
| 63 |
-
#
|
| 64 |
# ============================================
|
| 65 |
WORKDIR /data
|
| 66 |
RUN mkdir -p /root/.n8n /home/node/.n8n && \
|
| 67 |
chmod -R 777 /root/.n8n /home/node/.n8n
|
| 68 |
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
USER root
|
| 4 |
|
| 5 |
# ============================================
|
| 6 |
+
# 1. FORCER LES DNS GOOGLE (CRITIQUE!)
|
| 7 |
+
# ============================================
|
| 8 |
+
RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf && \
|
| 9 |
+
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
|
| 10 |
+
|
| 11 |
+
# ============================================
|
| 12 |
+
# 2. CERTIFICATS SSL + OUTILS RÉSEAU
|
| 13 |
# ============================================
|
| 14 |
RUN apk add --no-cache \
|
| 15 |
ca-certificates \
|
|
|
|
| 18 |
curl \
|
| 19 |
wget
|
| 20 |
|
|
|
|
| 21 |
RUN update-ca-certificates
|
| 22 |
|
| 23 |
# ============================================
|
| 24 |
+
# 3. OUTILS SYSTÈME DE BASE
|
| 25 |
# ============================================
|
| 26 |
RUN apk add --no-cache \
|
| 27 |
git python3 py3-pip make g++ build-base \
|
|
|
|
| 29 |
postgresql-client ffmpeg yt-dlp
|
| 30 |
|
| 31 |
# ============================================
|
| 32 |
+
# 4. PDF (pandoc, ghostscript, libreoffice)
|
| 33 |
# ============================================
|
| 34 |
RUN apk add --no-cache \
|
| 35 |
pandoc \
|
|
|
|
| 39 |
libreoffice-calc
|
| 40 |
|
| 41 |
# ============================================
|
| 42 |
+
# 5. NAVIGATEURS (Chromium)
|
| 43 |
# ============================================
|
| 44 |
RUN apk add --no-cache \
|
| 45 |
chromium \
|
|
|
|
| 60 |
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
| 61 |
|
| 62 |
# ============================================
|
| 63 |
+
# 6. N8N
|
| 64 |
# ============================================
|
| 65 |
RUN npm install -g n8n@latest
|
| 66 |
|
| 67 |
# ============================================
|
| 68 |
+
# 7. PERMISSIONS ET DÉMARRAGE AVEC DNS
|
| 69 |
# ============================================
|
| 70 |
WORKDIR /data
|
| 71 |
RUN mkdir -p /root/.n8n /home/node/.n8n && \
|
| 72 |
chmod -R 777 /root/.n8n /home/node/.n8n
|
| 73 |
|
| 74 |
+
# Script de démarrage qui configure DNS puis lance n8n
|
| 75 |
+
RUN echo '#!/bin/sh' > /start.sh && \
|
| 76 |
+
echo 'echo "nameserver 8.8.8.8" > /etc/resolv.conf' >> /start.sh && \
|
| 77 |
+
echo 'echo "nameserver 8.8.4.4" >> /etc/resolv.conf' >> /start.sh && \
|
| 78 |
+
echo 'exec n8n start' >> /start.sh && \
|
| 79 |
+
chmod +x /start.sh
|
| 80 |
+
|
| 81 |
+
CMD ["/start.sh"]
|