build(ocr): 精简 OCR sidecar 镜像
This commit is contained in:
@@ -1,15 +1,13 @@
|
|||||||
# syntax=docker/dockerfile:1.7
|
# 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
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
cmake \
|
cmake \
|
||||||
g++ \
|
|
||||||
gcc \
|
|
||||||
libc6-dev \
|
|
||||||
make \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
@@ -32,15 +30,12 @@ RUN cmake -S . -B build \
|
|||||||
-pthread -lm \
|
-pthread -lm \
|
||||||
-o /out/lw-http-ocr
|
-o /out/lw-http-ocr
|
||||||
|
|
||||||
FROM ubuntu:24.04
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
ca-certificates \
|
|
||||||
curl \
|
curl \
|
||||||
libc6 \
|
|
||||||
libgcc-s1 \
|
|
||||||
libstdc++6 \
|
libstdc++6 \
|
||||||
tzdata \
|
tzdata \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
This service wraps the vendored `lxw112190/lw.PPOCR.C` runtime and the
|
This service wraps the vendored `lxw112190/lw.PPOCR.C` runtime and the
|
||||||
PP-OCRv6 Tiny models behind the project's HTTP OCR API.
|
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:
|
It is intentionally private:
|
||||||
|
|
||||||
- no host port is published in production;
|
- no host port is published in production;
|
||||||
|
|||||||
Reference in New Issue
Block a user