feat(docker): 重組 Docker 架構 v0.1.6
- 優化 Dockerfile 註解與標頭 - 新增 Dockerfile.full 擴充範本 (FROM convertx-cn:latest) - 依地區分類 65+ OCR 語言 - 額外字型/TexLive 套件選項 - 每個區塊含預估大小說明 - 更新 docker.md 雙 Image 說明文件 - 版本更新至 0.1.6
This commit is contained in:
parent
569c572e62
commit
f675a68d87
5 changed files with 393 additions and 19 deletions
41
Dockerfile
41
Dockerfile
|
|
@ -1,8 +1,24 @@
|
|||
# ==============================================================================
|
||||
# ConvertX-CN 精簡版 Dockerfile
|
||||
# 優化版本:移除 texlive-full,精簡字型與語言支援
|
||||
# 目標:在 GitHub Actions 中穩定建構(解決 no space left on device)
|
||||
# 支援語言:中文(繁/簡)、日文、韓文、英文、德文、法文
|
||||
# ConvertX-CN 官方 Docker Image
|
||||
# 版本:v0.1.6
|
||||
# ==============================================================================
|
||||
#
|
||||
# 📦 Image 說明:
|
||||
# - 這是 ConvertX-CN 官方 Docker Hub Image 的生產 Dockerfile
|
||||
# - 目標:在功能完整性與 image 體積間取得平衡
|
||||
# - 適合一般使用者日常文件轉換需求
|
||||
#
|
||||
# 🌍 內建語言支援:
|
||||
# - OCR: 英文、繁體中文、簡體中文、日文、韓文、德文、法文
|
||||
# - Locale: en_US, zh_TW, zh_CN, ja_JP, ko_KR, de_DE, fr_FR
|
||||
# - 字型: Noto CJK, Liberation, 自訂中文字型
|
||||
#
|
||||
# 📊 Image 大小:約 4-6 GB
|
||||
#
|
||||
# 💡 如需完整 65 種 OCR 語言或進階功能,請參考:
|
||||
# - Dockerfile.full (完整版,使用者自行 build)
|
||||
# - 文件:docs/docker.md
|
||||
#
|
||||
# ==============================================================================
|
||||
|
||||
FROM debian:trixie-slim AS base
|
||||
|
|
@ -53,9 +69,19 @@ RUN bun run build
|
|||
FROM base AS release
|
||||
|
||||
# ==============================================================================
|
||||
# 精簡依賴安裝(單一 RUN 層,優化 cache 與空間)
|
||||
# ❌ 已移除:texlive-full, fonts-noto-extra, 多餘語言包
|
||||
# ✅ 保留:核心轉換工具 + 最小 TexLive + 必要字型
|
||||
# 依賴安裝(單一 RUN 層,優化 cache 與空間)
|
||||
# ==============================================================================
|
||||
#
|
||||
# ✅ 核心轉換工具:完整保留
|
||||
# ✅ TexLive:最小集合(支援 CJK、德文、法文)
|
||||
# ✅ OCR:7 種主要語言
|
||||
# ✅ 字型:Noto CJK + Liberation
|
||||
#
|
||||
# ❌ 未內建(體積過大,請參考 Dockerfile.full):
|
||||
# - texlive-full(約 +3GB)
|
||||
# - 65 種 OCR 語言(約 +2GB)
|
||||
# - fonts-noto-extra(約 +500MB)
|
||||
#
|
||||
# ==============================================================================
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
# === 基礎轉換工具 ===
|
||||
|
|
@ -117,7 +143,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
tesseract-ocr-deu \
|
||||
tesseract-ocr-fra \
|
||||
# === 字型(精簡版)===
|
||||
#fonts-noto-cjk
|
||||
# fonts-noto-core: Noto Sans/Serif Latin(歐語基礎)
|
||||
# fonts-noto-color-emoji: Emoji 支援(僅此一套)
|
||||
# fonts-liberation: Liberation 字型(Arial/Times 替代)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue