FROM python:3.11-slim

RUN pip install --no-cache-dir \
    --index-url https://mirrors.aliyun.com/pypi/simple \
    ddddocr==1.6.1

WORKDIR /app
COPY ocr.py /app/ocr.py
USER nobody
ENTRYPOINT ["python", "/app/ocr.py"]
