docker运行python3.7

Posted 一起来学python

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker运行python3.7相关的知识,希望对你有一定的参考价值。

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.7的主要内容,如果未能解决你的问题,请参考以下文章

Docker删除报错:Error response from daemon: conflict: unable to delete 08b152afcfae (must be forced)(代码片段

如何在 Python3.7 docker 容器中执行并行 PostgreSQL 查询?

在docker中为python项目加载Teradata ODBC驱动程序时出错

dockerCentOS6.8+Python3.7+selenium+Firefox的搭建

docker快速搭建分布式爬虫pyspider

dockerCentOS7.4+Python3.7+selenium+Firefox+tesseract的搭建