update dockerfile

This commit is contained in:
Henry 2025-11-15 12:48:20 +00:00
parent 4a642f02d0
commit a7959e8d62
1 changed files with 20 additions and 16 deletions

View File

@ -5,33 +5,37 @@
# docker run -d -p 3000:3000 flowise # docker run -d -p 3000:3000 flowise
FROM node:20-alpine FROM node:20-alpine
RUN apk add --update libc6-compat python3 make g++
# needed for pdfjs-dist
RUN apk add --no-cache build-base cairo-dev pango-dev
# Install Chromium # Install system dependencies and build tools
RUN apk add --no-cache chromium RUN apk update && \
apk add --no-cache \
# Install curl for container-level health checks libc6-compat \
# Fixes: https://github.com/FlowiseAI/Flowise/issues/4126 python3 \
RUN apk add --no-cache curl make \
g++ \
#install PNPM globaly build-base \
RUN npm install -g pnpm cairo-dev \
pango-dev \
chromium \
curl && \
npm install -g pnpm
ENV PUPPETEER_SKIP_DOWNLOAD=true ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV NODE_OPTIONS=--max-old-space-size=8192 ENV NODE_OPTIONS=--max-old-space-size=8192
WORKDIR /usr/src WORKDIR /usr/src/flowise
# Copy app source # Copy app source
COPY . . COPY . .
RUN pnpm install # Install dependencies and build
RUN pnpm install && \
pnpm build
RUN pnpm build # Switch to non-root user (node user already exists in node:20-alpine)
USER node
EXPOSE 3000 EXPOSE 3000