BookingService/Dockerfile

34 lines
1010 B
Docker
Raw Permalink Normal View History

2019-05-08 13:25:35 +08:00
FROM python:3.7-alpine
LABEL AUTHOR="DavidZ"
2019-05-24 23:09:07 +08:00
ENV ENV PROD
2019-05-08 13:25:35 +08:00
# 更改alpine镜像源并安装依赖
RUN sed -i 's/dl-cdn.alpinelinux.org/mirror.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
2019-05-28 14:52:10 +08:00
&& apk add -U --no-cache gcc \
musl-dev \
# postgresql
postgresql-dev \
# pillow
jpeg-dev \
zlib-dev \
freetype-dev \
lcms2-dev \
openjpeg-dev \
tiff-dev \
tk-dev \
tcl-dev
2019-05-08 13:25:35 +08:00
# 更换pip镜像源并更新pip
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
&& pip install --upgrade pip
# 安装uwsgi
RUN apk add -U --no-cache linux-headers --virtual .uwsgi-deps \
&& pip3 install uwsgi \
&& apk del .uwsgi-deps
2019-05-08 13:26:56 +08:00
RUN python