Files
Worph 346c02567b
Build and Push Docker Image / build (push) Failing after 13s
improve extractor
2026-09-13 11:52:10 +02:00

35 lines
856 B
Docker

# MetaMesh Plugin: subtitle-extractor - Test Image
# Builds the plugin and runs tests with ffmpeg available
FROM node:20-slim
# ffmpeg for fixture generation and the extraction tests
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy package files and install ALL dependencies (including devDependencies)
COPY package.json tsconfig.json vitest.config.ts ./
RUN npm install
# Copy source and test files
COPY src/ ./src/
COPY test/ ./test/
# Build the plugin
RUN npm run build
# Generate test fixtures
RUN chmod +x ./test/fixtures/generate-test-fixtures.sh && \
./test/fixtures/generate-test-fixtures.sh
# Temp dir ffmpeg writes tracks into before upload
RUN mkdir -p /cache/temp && chmod 777 /cache
ENV NODE_ENV=test
ENV CACHE_PATH=/cache
CMD ["npm", "test"]