Spaces:
Paused
Paused
Create Dockerfile
Browse files- Dockerfile +25 -0
Dockerfile
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stage 1: Build stage
|
| 2 |
+
FROM node:20-alpine AS build
|
| 3 |
+
|
| 4 |
+
USER root
|
| 5 |
+
|
| 6 |
+
# Skip downloading Chrome for Puppeteer (saves build time)
|
| 7 |
+
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
| 8 |
+
|
| 9 |
+
# Install latest Flowise globally (specific version can be set: flowise@1.0.0)
|
| 10 |
+
RUN npm install -g flowise
|
| 11 |
+
|
| 12 |
+
# Stage 2: Runtime stage
|
| 13 |
+
FROM node:20-alpine
|
| 14 |
+
|
| 15 |
+
# Install runtime dependencies
|
| 16 |
+
RUN apk add --no-cache chromium git python3 py3-pip make g++ build-base cairo-dev pango-dev curl
|
| 17 |
+
|
| 18 |
+
# Set the environment variable for Puppeteer to find Chromium
|
| 19 |
+
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
| 20 |
+
|
| 21 |
+
# Copy Flowise from the build stage
|
| 22 |
+
COPY --from=build /usr/local/lib/node_modules /usr/local/lib/node_modules
|
| 23 |
+
COPY --from=build /usr/local/bin /usr/local/bin
|
| 24 |
+
|
| 25 |
+
ENTRYPOINT ["flowise", "start"]
|