tcustomb commited on
Commit
4bb316b
·
verified ·
1 Parent(s): c4369ec

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the latest n8n 2.x image
2
+ FROM n8nio/n8n:latest
3
+
4
+ USER root
5
+
6
+ # THE HEIST: n8n 2.x doesn't have a package manager. We are stealing 'apk' from a fresh Alpine image.
7
+ RUN ARCH=$(uname -m) && \
8
+ wget -qO- "http://dl-cdn.alpinelinux.org/alpine/latest-stable/main/${ARCH}/" | \
9
+ grep -o 'href="apk-tools-static-[^"]*\.apk"' | head -1 | cut -d'"' -f2 | \
10
+ xargs -I {} wget -q "http://dl-cdn.alpinelinux.org/alpine/latest-stable/main/${ARCH}/{}" && \
11
+ tar -xzf apk-tools-static-*.apk && \
12
+ ./sbin/apk.static -X http://dl-cdn.alpinelinux.org/alpine/latest-stable/main -U --allow-untrusted add apk-tools && \
13
+ rm -rf sbin apk-tools-static-*.apk
14
+
15
+ # Now that we have apk back, install our Customs Broker Toolkit
16
+ RUN apk add --no-cache \
17
+ python3 \
18
+ py3-pip \
19
+ chromium \
20
+ nss \
21
+ freetype \
22
+ harfbuzz \
23
+ ca-certificates \
24
+ ttf-freefont \
25
+ ffmpeg \
26
+ git
27
+
28
+ # Set environment variables so n8n knows where Chromium is (for Puppeteer/Scraping)
29
+ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
30
+ PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser \
31
+ N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
32
+
33
+ USER node