FROM python:3.8 AS pipenv_build
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
pip install pipenv
COPY ./Pipfile* /tmp/
RUN cd /tmp && \
pipenv lock --requirements > requirements.txt
# ==========
FROM python:3.8
WORKDIR /src
COPY --from=pipenv_build /tmp/requirements.txt .
RUN pip install -r requirements.txt
ADD . .
CMD uvicorn server:app --host=0.0.0.0 --port=5000
docker运行python3.8
猜你喜欢
转载自www.cnblogs.com/c-x-a/p/12390684.html
今日推荐
周排行