telev / Dockerfile
mozolla's picture
Update Dockerfile
d401402 verified
Raw History Blame Contribute Delete
1.33 kB
FROM node:20-bookworm
WORKDIR /app
# Install dependencies for FFmpeg extraction and locales
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
ca-certificates \
xz-utils \
curl \
locales \
&& sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
&& locale-gen en_US.UTF-8 \
&& update-locale LANG=en_US.UTF-8 \
&& rm -rf /var/lib/apt/lists/*
# Use UTF-8 locales
ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
# Download and install FFmpeg from BtbN (linux64-gpl build)
RUN wget -q https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz || \
curl -L -O https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz && \
tar -xf ffmpeg-master-latest-linux64-gpl.tar.xz && \
mv ffmpeg-master-latest-linux64-gpl/bin/ffmpeg /usr/local/bin/ffmpeg && \
mv ffmpeg-master-latest-linux64-gpl/bin/ffprobe /usr/local/bin/ffprobe && \
rm -rf ffmpeg-master-latest-linux64-gpl.tar.xz ffmpeg-master-latest-linux64-gpl
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Add these lines:
ENV DOWNLOADS_DIR=/mnt/data/downloads
ENV ENCODED_DIR=/mnt/data/encoded
ENV PORT=7860
EXPOSE 7860
CMD ["node", "server/index.js"]