Skip to content

Instantly share code, notes, and snippets.

@artemis15
Forked from gbdevw/n8n-docling-dockerfile
Created August 18, 2025 06:41
Show Gist options
  • Select an option

  • Save artemis15/e62434a6c4ce5d642e230e79af62e1d3 to your computer and use it in GitHub Desktop.

Select an option

Save artemis15/e62434a6c4ce5d642e230e79af62e1d3 to your computer and use it in GitHub Desktop.
N8N with Python environment and Docling
FROM debian:bullseye-slim
ENV NODE_VERSION=20 \
N8N_VERSION=1.102.0 \
PYTHON_PACKAGES_PATH=/home/n8n/.local
# 1. Install base dependencies
RUN apt-get update && apt-get install -y \
curl gnupg git python3 python3-pip python3-venv build-essential bash \
&& apt-get clean
SHELL ["/bin/bash", "-c"]
# 2. Install NodeJS
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - \
&& apt-get install -y nodejs
# 3. Install N8N
RUN npm install -g n8n@${N8N_VERSION}
# 4. Create a non-root user for n8n
RUN useradd -m -s /bin/bash n8n
USER n8n
WORKDIR /home/n8n
# 5. Add the local Python path to PATH
# NOTE: Do this before installing Python packages to avoid warnings
ENV PATH="${PYTHON_PACKAGES_PATH}/bin:${PATH}"
# 6. Install docling
RUN pip3 install --user docling
# 7. Default port for N8N
EXPOSE 5678
CMD ["n8n"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment