n8n / Dockerfile
ahsanr's picture
Update Dockerfile
fabbdcd verified
raw
history blame contribute delete
628 Bytes
FROM node:20-alpine
USER root
# System deps
RUN apk add --no-cache git python3 py3-pip make g++ build-base \
cairo-dev pango-dev chromium postgresql-client ffmpeg yt-dlp \
openssl curl bash unzip libaio
# Install n8n globally
RUN npm install -g n8n@1.104.2
# Prepare directories
RUN mkdir -p /home/node/.n8n/{database,config,workflows,logs} \
&& chown -R node:node /home/node \
&& chmod -R 755 /home/node
USER node
WORKDIR /data
# Environment variables
ENV N8N_HOST=0.0.0.0
ENV N8N_PORT=7860
ENV GENERIC_TIMEZONE=UTC
ENV N8N_RUNNERS_ENABLED=true
CMD ["n8n", "start", "--port", "7860", "--host", "0.0.0.0"]