12 lines
373 B
Docker
12 lines
373 B
Docker
ARG BASE_REGISTRY=docker.m.daocloud.io/library
|
|
FROM ${BASE_REGISTRY}/python:3.12-slim-bookworm
|
|
WORKDIR /app
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir \
|
|
-i https://pypi.tuna.tsinghua.edu.cn/simple \
|
|
--trusted-host pypi.tuna.tsinghua.edu.cn \
|
|
-r requirements.txt
|
|
COPY . .
|
|
EXPOSE 8001
|
|
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8001"]
|