19 lines
529 B
Docker
19 lines
529 B
Docker
# ====== python step ======
|
|
FROM python:3.13 AS python
|
|
# ====== install step ======
|
|
FROM python AS install
|
|
# ENV PIP_SOURCE https://pypi.tuna.tsinghua.edu.cn/simple/
|
|
ENV PIP_SOURCE https://mirrors.aliyun.com/pypi/simple
|
|
WORKDIR /app
|
|
COPY requirements.txt /app/requirements.txt
|
|
RUN pip install -i $PIP_SOURCE --upgrade pip --timeout=100
|
|
RUN pip3 install -i $PIP_SOURCE -r requirements.txt
|
|
# ====== run step ======
|
|
FROM install AS run
|
|
COPY . /app
|
|
# CMD ["python", "server.py"]
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["python3"]
|
|
CMD ["server.py"]
|
|
|