E5K7 commited on
Commit
1f74de6
·
1 Parent(s): 3035983

fix: Simplify Docker Node.js installation to use native Debian packages to avoid environment symlink errors

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -11
Dockerfile CHANGED
@@ -1,20 +1,13 @@
1
- # Use multi-stage build to get Node.js binaries securely
2
- FROM node:20-slim AS node_base
3
-
4
  # Use Python 3.10 as base
5
  FROM python:3.10-slim
6
 
7
- # Copy Node.js from the official image
8
- COPY --from=node_base /usr/local/bin/node /usr/local/bin/
9
- COPY --from=node_base /usr/local/lib/node_modules /usr/local/lib/node_modules
10
- RUN ln -s /usr/local/bin/node /usr/local/bin/nodejs && \
11
- ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm && \
12
- ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx
13
-
14
- # Install system dependencies (ffmpeg for audio processing)
15
  RUN apt-get update && apt-get install -y \
16
  ffmpeg \
17
  git \
 
 
18
  && apt-get clean \
19
  && rm -rf /var/lib/apt/lists/*
20
 
 
 
 
 
1
  # Use Python 3.10 as base
2
  FROM python:3.10-slim
3
 
4
+ # Install system dependencies (ffmpeg for audio processing, and Node.js/npm for frontend)
5
+ # Debian Bookworm includes Node 18.19 natively, which satisfies Next.js 14 requirements.
 
 
 
 
 
 
6
  RUN apt-get update && apt-get install -y \
7
  ffmpeg \
8
  git \
9
+ nodejs \
10
+ npm \
11
  && apt-get clean \
12
  && rm -rf /var/lib/apt/lists/*
13