build(ocr): 精简 OCR sidecar 镜像

This commit is contained in:
yml
2026-11-17 17:32:34 +08:00
parent 90addb80d5
commit b0bb20e589
2 changed files with 7 additions and 9 deletions
+4 -9
View File
@@ -1,15 +1,13 @@
# syntax=docker/dockerfile:1.7
FROM ubuntu:24.04 AS build
# The sidecar is fully containerized; the host OS only needs to run Docker.
FROM debian:bookworm-slim AS build
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
g++ \
gcc \
libc6-dev \
make \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
@@ -32,15 +30,12 @@ RUN cmake -S . -B build \
-pthread -lm \
-o /out/lw-http-ocr
FROM ubuntu:24.04
FROM debian:bookworm-slim
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
libc6 \
libgcc-s1 \
libstdc++6 \
tzdata \
&& rm -rf /var/lib/apt/lists/* \
+3
View File
@@ -3,6 +3,9 @@
This service wraps the vendored `lxw112190/lw.PPOCR.C` runtime and the
PP-OCRv6 Tiny models behind the project's HTTP OCR API.
It is a self-contained Debian slim Docker image. The production host does not
need Ubuntu packages, a compiler, Python, PaddleOCR, or the OCR models installed.
It is intentionally private:
- no host port is published in production;