[PR #1860] fix(docker): Rewrite Dockerfile to fix broken builds #2630

Open
opened 2026-01-29 17:23:10 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/CCExtractor/ccextractor/pull/1860

State: closed
Merged: Yes


Summary

Fixes #1550 - Docker builds were broken after PR #1535 switched from vendored GPAC to system GPAC.

Key Changes

  • Switch from Alpine to Debian Bookworm: Alpine's musl libc has issues with Rust bindgen's libclang dynamic loading, causing build failures
  • Support three build variants via BUILD_TYPE argument:
    • minimal: No OCR support (~130MB image)
    • ocr (default): Tesseract OCR for bitmap subtitles (~215MB image)
    • hardsubx: OCR + FFmpeg for burned-in subtitle extraction (~610MB image)
  • Support dual source modes via USE_LOCAL_SOURCE argument:
    • 0 (default): Clone from GitHub (standalone Dockerfile usage)
    • 1: Use local source (faster builds for developers with cloned repo)
  • Add .dockerignore: Reduces build context from ~2.7GB to ~900KB
  • Updated docker/README.md: Comprehensive documentation for all build options

Build Examples

# Standalone build (clones from GitHub)
docker build -t ccextractor docker/
docker build --build-arg BUILD_TYPE=hardsubx -t ccextractor docker/

# From cloned repository (faster)
docker build --build-arg USE_LOCAL_SOURCE=1 -f docker/Dockerfile -t ccextractor .
docker build --build-arg USE_LOCAL_SOURCE=1 --build-arg BUILD_TYPE=minimal -f docker/Dockerfile -t ccextractor .

Test plan

  • Build and test minimal variant
  • Build and test ocr variant
  • Build and test hardsubx variant
  • Verify --version output shows correct library versions for each variant

🤖 Generated with Claude Code

**Original Pull Request:** https://github.com/CCExtractor/ccextractor/pull/1860 **State:** closed **Merged:** Yes --- ## Summary Fixes #1550 - Docker builds were broken after PR #1535 switched from vendored GPAC to system GPAC. ### Key Changes - **Switch from Alpine to Debian Bookworm**: Alpine's musl libc has issues with Rust bindgen's libclang dynamic loading, causing build failures - **Support three build variants** via `BUILD_TYPE` argument: - `minimal`: No OCR support (~130MB image) - `ocr` (default): Tesseract OCR for bitmap subtitles (~215MB image) - `hardsubx`: OCR + FFmpeg for burned-in subtitle extraction (~610MB image) - **Support dual source modes** via `USE_LOCAL_SOURCE` argument: - `0` (default): Clone from GitHub (standalone Dockerfile usage) - `1`: Use local source (faster builds for developers with cloned repo) - **Add `.dockerignore`**: Reduces build context from ~2.7GB to ~900KB - **Updated `docker/README.md`**: Comprehensive documentation for all build options ### Build Examples ```bash # Standalone build (clones from GitHub) docker build -t ccextractor docker/ docker build --build-arg BUILD_TYPE=hardsubx -t ccextractor docker/ # From cloned repository (faster) docker build --build-arg USE_LOCAL_SOURCE=1 -f docker/Dockerfile -t ccextractor . docker build --build-arg USE_LOCAL_SOURCE=1 --build-arg BUILD_TYPE=minimal -f docker/Dockerfile -t ccextractor . ``` ## Test plan - [x] Build and test `minimal` variant - [x] Build and test `ocr` variant - [x] Build and test `hardsubx` variant - [x] Verify `--version` output shows correct library versions for each variant 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claunia added the pull-request label 2026-01-29 17:23:10 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2630