| |
| FROM python:3.11-slim AS builder |
|
|
| |
| WORKDIR /app |
|
|
| |
| ENV PYTHONDONTWRITEBYTECODE=1 |
| ENV PYTHONUNBUFFERED=1 |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| gcc \ |
| libffi-dev \ |
| python3-dev \ |
| curl \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| COPY <<EOF ./requirements.txt |
| annotated-doc==0.0.4 |
| annotated-types==0.7.0 |
| anyio==4.12.1 |
| certifi==2026.1.4 |
| cffi==2.0.0 |
| click==8.3.1 |
| colorama==0.4.6 |
| curl-cffi==0.14.0 |
| fastapi==0.128.0 |
| h11==0.16.0 |
| h2==4.3.0 |
| hpack==4.1.0 |
| httpcore==1.0.9 |
| httpx==0.28.1 |
| hyperframe==6.1.0 |
| idna==3.11 |
| pycparser==3.0 |
| pydantic==2.12.5 |
| pydantic-core==2.41.5 |
| starlette==0.50.0 |
| typing-extensions==4.15.0 |
| typing-inspection==0.4.2 |
| uvicorn==0.40.0 |
| slowapi |
| EOF |
|
|
| |
| RUN pip install --no-cache-dir --prefix=/install -r requirements.txt |
|
|
| |
| FROM python:3.11-slim |
|
|
| WORKDIR /app |
|
|
| |
| COPY --from=builder /install /usr/local |
| |
| COPY entrypoint.sh /app/entrypoint.sh |
|
|
| |
| RUN apt-get update && apt-get install -y curl --no-install-recommends \ |
| && rm -rf /var/lib/apt/lists/* \ |
| && chmod +x /app/entrypoint.sh |
|
|
| |
| ENTRYPOINT ["/app/entrypoint.sh"] |