|
FROM node:18-alpine |
|
|
|
|
|
USER root |
|
|
|
|
|
ARG N8N_PATH=/usr/local/lib/node_modules/n8n |
|
ARG BASE_PATH=/root/.n8n |
|
ARG DATABASE_PATH=$BASE_PATH/database |
|
ARG CONFIG_PATH=$BASE_PATH/config |
|
ARG WORKFLOWS_PATH=$BASE_PATH/workflows |
|
ARG LOGS_PATH=$BASE_PATH/logs |
|
|
|
|
|
RUN apk add --no-cache \ |
|
git \ |
|
python3 \ |
|
py3-pip \ |
|
make \ |
|
g++ \ |
|
build-base \ |
|
cairo-dev \ |
|
pango-dev \ |
|
chromium \ |
|
postgresql-client |
|
|
|
|
|
ENV PUPPETEER_SKIP_DOWNLOAD=true |
|
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser |
|
|
|
|
|
RUN npm install -g n8n |
|
|
|
|
|
RUN mkdir -p $DATABASE_PATH $CONFIG_PATH $WORKFLOWS_PATH $LOGS_PATH \ |
|
&& chmod -R 777 $BASE_PATH |
|
|
|
|
|
WORKDIR /data |
|
|
|
|
|
CMD ["n8n", "start"] |