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

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

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1860
Author: @cfsmp3
Created: 12/20/2025
Status: Merged
Merged: 12/20/2025
Merged by: @cfsmp3

Base: masterHead: fix/issue-1550-docker-builds


📝 Commits (1)

  • 3f45a4e fix(docker): Rewrite Dockerfile to fix broken builds

📊 Changes

4 files changed (+339 additions, -79 deletions)

View changed files

.dockerignore (+37 -0)
docker/Dockerfile (+239 -0)
📝 docker/README.md (+63 -33)
docker/dockerfile (+0 -46)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1860 **Author:** [@cfsmp3](https://github.com/cfsmp3) **Created:** 12/20/2025 **Status:** ✅ Merged **Merged:** 12/20/2025 **Merged by:** [@cfsmp3](https://github.com/cfsmp3) **Base:** `master` ← **Head:** `fix/issue-1550-docker-builds` --- ### 📝 Commits (1) - [`3f45a4e`](https://github.com/CCExtractor/ccextractor/commit/3f45a4e136f7059c95dd838810e673569075ae35) fix(docker): Rewrite Dockerfile to fix broken builds ### 📊 Changes **4 files changed** (+339 additions, -79 deletions) <details> <summary>View changed files</summary> ➕ `.dockerignore` (+37 -0) ➕ `docker/Dockerfile` (+239 -0) 📝 `docker/README.md` (+63 -33) ➖ `docker/dockerfile` (+0 -46) </details> ### 📄 Description ## 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#2627