From f3c12b8804d77dee11e555a51d60138f67c5bcd0 Mon Sep 17 00:00:00 2001 From: Snow Wang <31466760+why2lyj@users.noreply.github.com> Date: Thu, 16 Jul 2020 17:44:22 +0800 Subject: [PATCH] Update docker timezone --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c53663c..af42b4d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,14 @@ -# 说明该镜像以哪个镜像为基础 FROM python:3.7-slim -RUN mkdir /youxiang +MAINTAINER Snow Wang + WORKDIR /youxiang - COPY requirements.txt requirements.txt - -RUN pip install -r requirements.txt COPY . /youxiang +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone && \ + mkdir /youxiang && \ + pip install -r requirements.txt + ENTRYPOINT ["python", "/youxiang/main.py"]