From eab46652b182ac6fdd3ebb87cc89a8efb3c9b96a Mon Sep 17 00:00:00 2001 From: Renzhi Date: Fri, 20 Dec 2019 22:15:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=88=A9=E7=94=A8docker=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E5=8A=A0=E9=80=9F=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 5 +++++ Dockerfile37 | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 9e3882d..e3fc22b 100755 --- a/.dockerignore +++ b/.dockerignore @@ -5,5 +5,10 @@ **/*~ **/.DS_Store **/Thumbs.db +*.png .idea/ .git/ +.github/ +*.md +UnitTest/ +uml/ diff --git a/Dockerfile37 b/Dockerfile37 index d00eeab..8a6770a 100644 --- a/Dockerfile37 +++ b/Dockerfile37 @@ -9,7 +9,6 @@ echo 'deb http://mirrors.163.com/debian-security/ jessie/updates main non-free c RUN apt-get -y update -ADD . /usr/src/app WORKDIR /usr/src/app RUN wget -c https://dl.lancdn.com/landian/soft/chrome/m/77.0.3865.120_amd64.deb && \ @@ -28,11 +27,14 @@ unzip chromedriver_linux64.zip ENV DEBIAN_FRONTEND noninteractive ENV TZ Asia/Shanghai +COPY requirements.txt /usr/src/app/ ## 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 +COPY . /usr/src/app + ## 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 \ @@ -43,5 +45,5 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone #EXPOSE 5010 -CMD [ "python", "run.py" ] +CMD [ "python", "run.py", "r" ] #ENTRYPOINT [ "python", "run.py" ]