From 51f17c9539f8e6e2d60be77843a6d235d5597ac6 Mon Sep 17 00:00:00 2001 From: mkg <1650473152@qq.com> Date: Thu, 28 Oct 2021 13:12:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..45a2cbe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM python:3.7-alpine + + +RUN echo http://mirrors.aliyun.com/alpine/v3.12/main > /etc/apk/repositories \ + && echo http://mirrors.aliyun.com/alpine/v3.12/community >> /etc/apk/repositories \ + && apk update \ + && apk --update add --no-cache gcc \ + && apk --update add --no-cache g++ \ + && apk --update add --no-cache tzdata \ + && apk --update add --no-cache libffi-dev \ + && apk --update add --no-cache libxslt-dev \ + && apk --update add --no-cache jpeg-dev + +ENV TIME_ZONE Asia/Shanghai +ENV PIPURL "https://pypi.tuna.tsinghua.edu.cn/simple" + +RUN echo "${TIME_ZONE}" > /etc/timezone \ + && ln -sf /usr/share/zoneinfo/${TIME_ZONE} /etc/localtime + +COPY . /app +WORKDIR /app + +RUN pip --no-cache-dir install -i ${PIPURL} --upgrade pip \ + && pip --no-cache-dir install -i ${PIPURL} -r requirement/requirement-dev.txt \ + && pip --no-cache-dir install -i ${PIPURL} gunicorn \ + && chmod +x start.sh +CMD ./start.sh \ No newline at end of file