From 65bf586d0c6182cf4a1208a36dde104a6d8e8577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E7=BF=BC=E7=BE=8A=E7=8E=8B?= <1993333339@qq.com> Date: Sun, 7 May 2023 09:18:06 +0000 Subject: [PATCH] update Dockerfile. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 六翼羊王 <1993333339@qq.com> --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 65b7e88..8a775b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,17 @@ FROM pearadminflask/python3.7-flask:pillow COPY . /app/ - +COPY dockerdata/gunicorn.conf.py /app/ WORKDIR /app/ ENV TIME_ZONE Asia/Shanghai RUN echo "${TIME_ZONE}" > /etc/timezone \ && ln -sf /usr/share/zoneinfo/${TIME_ZONE} /etc/localtime -RUN pip --no-cache-dir install -i ${PIPURL} --upgrade pip \ - && pip --no-cache-dir install -i ${PIPURL} -r requirements.txt \ - && pip --no-cache-dir install -i ${PIPURL} gunicorn -RUN apk add mysql-client +ENV PIPURL "https://pypi.tuna.tsinghua.edu.cn/simple/ --trusted-host pypi.douban.com" +RUN apk update && apk add mysql-client RUN chmod +x start.sh RUN sed -i 's/MYSQL_HOST = "127.0.0.1"/MYSQL_HOST = "mysql"/' applications/config.py RUN sed -i 's/REDIS_HOST = "127.0.0.1"/REDIS_HOST = "redis"/' applications/config.py -CMD /bin/sh \ No newline at end of file +CMD /bin/sh \ No newline at end of file