From 9fa568e93b84a16ac043d518cd9bf593963580f1 Mon Sep 17 00:00:00 2001 From: tan <447542994@qq.com> Date: Thu, 10 Jan 2019 10:55:20 +0800 Subject: [PATCH] update Dockerfile file --- Dockerfile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a49deeeb..7237e0f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,20 @@ ADD . /usr/src/app ENV DEBIAN_FRONTEND noninteractive ENV TZ Asia/Shanghai -RUN pip install --no-cache-dir -r requirements.txt + +## install python requirements +RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyspider --no-cache-dir -r requirements.txt +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +## install ntpdate, not accept but saving code +#RUN echo 'deb http://mirrors.163.com/debian/ jessie main non-free contrib \ +# deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib \ +# deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib' > /etc/apt/sources.list \ +# && apt-get update\ +# && apt-get install ntpdate -y \ + #EXPOSE 5010 -#CMD [ "python", "run.py" ] -ENTRYPOINT [ "python", "run.py" ] +CMD [ "python", "run.py" ] +#ENTRYPOINT [ "python", "run.py" ]