Files
Nodecast/Dockerfile
blomios 1abc56c90e fix: enable Laya language detection and harden live analysis (#18 #19 #20)
Ensure Docker images keep their container-built native dependencies, wait for the Laya sidecar healthcheck, expose accurate Laya readiness, and treat empty AI language batches as fallback failures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-05 23:10:31 +02:00

58 lines
1.5 KiB
Docker

# NodeCast TV Docker Image
#
# Hardware acceleration:
# - VAAPI (Intel/AMD): Mount /dev/dri and add video/render groups
# - NVIDIA NVENC: Requires nvidia-container-toolkit on host + --gpus flag
# - Intel QSV: Mount /dev/dri
#
# Build: docker compose build
# Run with VAAPI: docker run --device /dev/dri:/dev/dri --group-add video ...
FROM ubuntu:24.04
# Install Node.js, FFmpeg, and hardware acceleration drivers
ARG TARGETARCH
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ca-certificates \
gnupg \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& if [ "$TARGETARCH" = "amd64" ]; then \
DRIVERS="mesa-va-drivers intel-media-va-driver vainfo"; \
else \
DRIVERS=""; \
fi \
&& apt-get update && apt-get install -y --no-install-recommends \
nodejs \
ffmpeg \
python3 \
make \
g++ \
$DRIVERS \
&& rm -rf /var/lib/apt/lists/*
# Verify FFmpeg installed
RUN ffmpeg -version && ffmpeg -encoders 2>/dev/null | grep -E "vaapi|nvenc|qsv|libx264" | head -10
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies (better-sqlite3 will build for the image's Node.js ABI).
# node_modules is excluded by .dockerignore so COPY below cannot overwrite it.
RUN npm ci --omit=dev
# Copy application files
COPY . .
# Create data and cache directories
RUN mkdir -p /app/data /app/transcode-cache && chmod 777 /app/transcode-cache
# Expose port
EXPOSE 3000
# Start server
CMD ["node", "server/index.js"]