# Start from the official n8n image FROM n8nio/n8n # Switch to root user to install system packages USER root # Install Python and pip for Alpine Linux # hadolint ignore=DL3018 RUN apk add --no-cache python3 py3-pip # Install the gemini python package RUN pip install --break-system-packages google-generativeai # Switch back to the non-root user that n8n uses USER node