This Dockerfile builds CCExtractor with support for multiple build variants.
| Variant | Description | Features |
|---|---|---|
minimal |
Basic CCExtractor | No OCR support |
ocr |
With OCR support (default) | Tesseract OCR for bitmap subtitles |
hardsubx |
With burned-in subtitle extraction | OCR + FFmpeg for hardcoded subtitles |
You can build CCExtractor using just the Dockerfile - it will clone the source from GitHub:
# Default build (OCR enabled)
docker build -t ccextractor docker/
# Minimal build (no OCR)
docker build --build-arg BUILD_TYPE=minimal -t ccextractor docker/
# HardSubX build (OCR + FFmpeg for burned-in subtitles)
docker build --build-arg BUILD_TYPE=hardsubx -t ccextractor docker/If you have already cloned the repository, you can use local source for faster builds:
git clone https://github.com/CCExtractor/ccextractor.git
cd ccextractor
# Default build (OCR enabled)
docker build --build-arg USE_LOCAL_SOURCE=1 -f docker/Dockerfile -t ccextractor .
# Minimal build
docker build --build-arg USE_LOCAL_SOURCE=1 --build-arg BUILD_TYPE=minimal -f docker/Dockerfile -t ccextractor .
# HardSubX build
docker build --build-arg USE_LOCAL_SOURCE=1 --build-arg BUILD_TYPE=hardsubx -f docker/Dockerfile -t ccextractor .| Argument | Default | Description |
|---|---|---|
BUILD_TYPE |
ocr |
Build variant: minimal, ocr, or hardsubx |
USE_LOCAL_SOURCE |
0 |
Set to 1 to use local source instead of cloning |
DEBIAN_VERSION |
bookworm-slim |
Debian version to use as base |
# Show version
docker run --rm ccextractor --version
# Show help
docker run --rm ccextractor --helpMount your local directory to process files:
# Process a video file with output file
docker run --rm -v $(pwd):$(pwd) -w $(pwd) ccextractor input.mp4 -o output.srt
# Process using stdout
docker run --rm -v $(pwd):$(pwd) -w $(pwd) ccextractor input.mp4 --stdout > output.srtdocker run --rm -it --entrypoint=/bin/bash ccextractorThe multi-stage build produces runtime images:
minimal: ~130MBocr: ~215MB (includes Tesseract)hardsubx: ~610MB (includes Tesseract + FFmpeg)