2021-02-22 18:43:57 +08:00
|
|
|
FROM python:3.7-alpine
|
|
|
|
LABEL maintainer="www.mrdoc.fun"
|
|
|
|
ENV PYTHONUNBUFFERED=0 \
|
|
|
|
TZ=Asia/Shanghai \
|
|
|
|
LISTEN_PORT=10086\
|
|
|
|
USER=admin
|
|
|
|
COPY . /app/MrDoc/
|
|
|
|
|
|
|
|
WORKDIR /app/MrDoc
|
|
|
|
|
2021-08-06 16:53:46 +08:00
|
|
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
|
|
|
|
|
2021-02-22 18:43:57 +08:00
|
|
|
RUN set -x \
|
|
|
|
&& apk add --no-cache --virtual .build-deps build-base g++ gcc libxslt-dev python2-dev linux-headers \
|
|
|
|
&& apk add --no-cache pwgen git tzdata zlib-dev freetype-dev jpeg-dev mariadb-dev postgresql-dev \
|
2021-03-01 15:04:41 +08:00
|
|
|
&& python -m pip install --upgrade pip \
|
2021-02-22 18:43:57 +08:00
|
|
|
&& pip --no-cache-dir install -r requirements.txt \
|
|
|
|
&& pip --no-cache-dir install mysqlclient \
|
2021-02-24 09:50:25 +08:00
|
|
|
&& chmod +x docker_mrdoc.sh \
|
2021-02-22 18:43:57 +08:00
|
|
|
&& apk del .build-deps \
|
2021-02-22 18:46:53 +08:00
|
|
|
&& rm -rf /var/cache/apk/*
|
2021-02-22 18:43:57 +08:00
|
|
|
|
2021-02-23 22:38:20 +08:00
|
|
|
ENTRYPOINT ["./docker_mrdoc.sh"]
|