Twan07 commited on
Commit
598aeaa
·
verified ·
1 Parent(s): bc754dd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -13
Dockerfile CHANGED
@@ -1,28 +1,20 @@
1
  FROM node:18-slim
2
 
3
- # Cài công cụ hệ thống cần thiết: python3-full + pip + ffmpeg
4
- RUN apt-get update && apt-get install -y \
5
- python3-full \
6
- python3-pip \
7
- ffmpeg \
8
- curl \
9
- && rm -rf /var/lib/apt/lists/*
10
 
11
- # Cài yt-dlp thông qua pip
12
- RUN pip install --no-cache-dir yt-dlp
 
13
 
14
  # Tạo thư mục làm việc
15
  WORKDIR /app
16
 
17
- # Cài dependency Node.js
18
  COPY package.json .
19
  RUN npm install
20
 
21
- # Copy source code
22
  COPY . .
23
 
24
- # Expose port
25
  EXPOSE 7860
26
 
27
- # Run server
28
  CMD ["node", "index.js"]
 
1
  FROM node:18-slim
2
 
3
+ # Cài ffmpeg curl (đủ để dùng yt-dlp)
4
+ RUN apt-get update && apt-get install -y ffmpeg curl && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
5
 
6
+ # Cài yt-dlp từ GitHub release
7
+ RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp \
8
+ -o /usr/local/bin/yt-dlp && chmod a+rx /usr/local/bin/yt-dlp
9
 
10
  # Tạo thư mục làm việc
11
  WORKDIR /app
12
 
 
13
  COPY package.json .
14
  RUN npm install
15
 
 
16
  COPY . .
17
 
 
18
  EXPOSE 7860
19
 
 
20
  CMD ["node", "index.js"]