chore: update dockerfile
This commit is contained in:
+11
-13
@@ -1,7 +1,5 @@
|
|||||||
# NodeCast TV Docker Image
|
# NodeCast TV Docker Image
|
||||||
#
|
#
|
||||||
# Uses system FFmpeg with hardware acceleration drivers installed.
|
|
||||||
#
|
|
||||||
# Hardware acceleration:
|
# Hardware acceleration:
|
||||||
# - VAAPI (Intel/AMD): Mount /dev/dri and add video/render groups
|
# - VAAPI (Intel/AMD): Mount /dev/dri and add video/render groups
|
||||||
# - NVIDIA NVENC: Requires nvidia-container-toolkit on host + --gpus flag
|
# - NVIDIA NVENC: Requires nvidia-container-toolkit on host + --gpus flag
|
||||||
@@ -9,28 +7,28 @@
|
|||||||
#
|
#
|
||||||
# Build: docker compose build
|
# Build: docker compose build
|
||||||
# Run with VAAPI: docker run --device /dev/dri:/dev/dri --group-add video ...
|
# Run with VAAPI: docker run --device /dev/dri:/dev/dri --group-add video ...
|
||||||
# Run with NVENC: docker run --gpus all ...
|
|
||||||
|
|
||||||
FROM node:20-bookworm-slim
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
# Install FFmpeg, build dependencies, and hardware acceleration drivers
|
# Install Node.js, FFmpeg, and hardware acceleration drivers
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
RUN echo "deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" > /etc/apt/sources.list.d/non-free.sources.list && \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
apt-get update && apt-get install -y --no-install-recommends \
|
curl \
|
||||||
# FFmpeg
|
ca-certificates \
|
||||||
|
gnupg \
|
||||||
|
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
|
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
nodejs \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
# Build dependencies for better-sqlite3
|
|
||||||
python3 \
|
python3 \
|
||||||
make \
|
make \
|
||||||
g++ \
|
g++ \
|
||||||
# Hardware acceleration drivers
|
|
||||||
mesa-va-drivers \
|
mesa-va-drivers \
|
||||||
intel-media-va-driver \
|
intel-media-va-driver \
|
||||||
# Utilities
|
|
||||||
vainfo \
|
vainfo \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Verify FFmpeg installed and show version
|
# Verify FFmpeg installed
|
||||||
RUN ffmpeg -version && ffmpeg -encoders 2>/dev/null | grep -E "vaapi|nvenc|qsv|libx264" | head -10
|
RUN ffmpeg -version && ffmpeg -encoders 2>/dev/null | grep -E "vaapi|nvenc|qsv|libx264" | head -10
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@@ -38,7 +36,7 @@ WORKDIR /app
|
|||||||
# Copy package files
|
# Copy package files
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies (better-sqlite3 will build from source using g++ installed above)
|
||||||
RUN npm ci --only=production
|
RUN npm ci --only=production
|
||||||
|
|
||||||
# Copy application files
|
# Copy application files
|
||||||
|
|||||||
Reference in New Issue
Block a user