BookingService/Dockerfile

34 lines
1010 B
Docker

FROM python:3.7-alpine
LABEL AUTHOR="DavidZ"
ENV ENV PROD
# 更改alpine镜像源并安装依赖
RUN sed -i 's/dl-cdn.alpinelinux.org/mirror.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
&& 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
# 更换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
RUN python