add Dockerfile.基于alpine

另外:目前受限基础镜像限制,后续nginx版本,可能会重写.
This commit is contained in:
jonnyan404 2021-02-22 18:43:57 +08:00 committed by Gitee
parent f12c6ef2f5
commit 56f1fbae02

22
Dockerfile Normal file
View File

@ -0,0 +1,22 @@
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
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 \
&& pip --no-cache-dir install -r requirements.txt \
&& pip --no-cache-dir install mysqlclient \
&& chmod +x mrdoc.sh \
&& apk del .build-deps \
&& rm -rf /var/cache/apk/* \
&& mkdir -p /usr/share/fonts/win \
&& mv simsunb.ttf /usr/share/fonts/win
ENTRYPOINT ["./mrdoc.sh"]