Python 微服务开发中常用的Docker 模板

FROM ubuntu:18.04
ENV TZ Asia/Shanghai
RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
    apt-get update && \
    ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &&\
    apt-get install -y --no-install-recommends tzdata  python3.6 python3-dev python3-tk \
    python3-pip python3-setuptools ffmpeg openjdk-8-jdk-headless libsm6 libglib2.0-0

COPY ./requirements.txt /tmp/requirements.txt
RUN pip3 install --no-cache-dir -i https://pypi.tuna.tsinghua.edu.cn/simple -r /tmp/requirements.txt

COPY . /home/dolphin
WORKDIR /home/dolphin
ENV LANG C.UTF-8
ENV PYTHONIOENCODING utf-8
CMD gunicorn -b 0.0.0.0:8010 -w 2 flask_app:app --access-logfile - & python3 process_server.py

pip 常用镜像源:

https://pypi.tuna.tsinghua.edu.cn/simple

https://mirrors.aliyun.com/pypi/simple/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值