Apis / Dockerfile
darkvibe314's picture
Update Dockerfile
1975e32 verified
Raw
History Blame Contribute Delete
673 Bytes
FROM node:20-bookworm-slim
# 1. Install ffmpeg, python3 (Bookworm installs Python 3.11+), and curl
RUN apt-get update && apt-get install -y \
ffmpeg python3 curl \
&& rm -rf /var/lib/apt/lists/*
# 2. Download and install the official yt-dlp binary directly from GitHub
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o /usr/local/bin/yt-dlp \
&& chmod a+rx /usr/local/bin/yt-dlp
# 3. Setup Hugging Face User
USER node
WORKDIR /home/node/app
# 4. Install Node modules
COPY --chown=node:node package*.json ./
RUN npm install
# 5. Copy the rest of the application
COPY --chown=node:node . .
EXPOSE 7860
CMD ["node", "server.js"]