One - One Code All

Blog Content

python3.7.4-alpine安装gevent

Python Linux-Mac 容器化   2019-03-16 11:46:21

基于docker  安装gevent

FROM python:3.7.4-alpine
#FROM scratch

LABEL maintainer="i.1214 "

WORKDIR ./

COPY ./ ./

# important, 这里是需要安装alpine缺少的依赖包
RUN apk update && \
    apk add --no-cache ca-certificates && \
    apk add --no-cache --virtual .build-deps gcc musl-dev

# gevent 在这个 requirements.txt 中, gevent==1.4.0
RUN pip install --no-cache-dir -r requirements.txt

# 安装完成后清理缓存
RUN apk del .build-deps gcc musl-dev && \
    rm -rf /var/cache/apk/*

EXPOSE 5000

ENTRYPOINT ["gunicorn", "--config", "./configs/gunicorn.py", "app:app"]



上一篇:docker(基于Alpine) 内安装numpy, matloplib, pillow安装依赖
下一篇:django中的objects.get和objects.filter方法的区别

The minute you think of giving up, think of the reason why you held on so long.