n8n use postgres d
This commit is contained in:
31
project/service/n8n/Dockerfile
Normal file
31
project/service/n8n/Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
||||
# Start with the official n8n image
|
||||
FROM n8nio/n8n:2.2.1
|
||||
|
||||
# Copy apk and its deps from Alpine 3.23
|
||||
COPY --from=alpine:3.23 /sbin/apk /sbin/apk
|
||||
COPY --from=alpine:3.23 /usr/lib/libapk.so* /usr/lib/
|
||||
|
||||
# Switch to root to install dependencies
|
||||
USER root
|
||||
|
||||
# Install Chromium and necessary dependencies for Puppeteer
|
||||
RUN apk add --no-cache \
|
||||
chromium \
|
||||
nss \
|
||||
freetype \
|
||||
harfbuzz \
|
||||
ca-certificates \
|
||||
ttf-freefont \
|
||||
wget \
|
||||
nodejs \
|
||||
npm
|
||||
|
||||
# Set environment variable for Puppeteer to find Chromium
|
||||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
RUN npm install puppeteer
|
||||
|
||||
# Revert back to non-root (default n8n user)
|
||||
USER node
|
||||
|
||||
Reference in New Issue
Block a user