forked from testerSunshine/12306
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile37
47 lines (30 loc) · 2.69 KB
/
Dockerfile37
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM python:3.7
ARG CDV=77.0.3865.40
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
echo 'deb http://mirrors.163.com/debian/ jessie main non-free contrib' > /etc/apt/sources.list && \
echo 'deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib' >> /etc/apt/sources.list && \
echo 'deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib' >> /etc/apt/sources.list
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 && \
apt-get install -y adwaita-icon-theme at-spi2-core dbus dconf-gsettings-backend dconf-service fonts-liberation glib-networking glib-networking-common glib-networking-services gsettings-desktop-schemas libappindicator3-1 libasound2 libasound2-data libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libcolord2 libcups2 libdbus-1-3 libdbusmenu-glib4 libdbusmenu-gtk3-4 libdconf1 libdrm2 libfile-basedir-perl libfile-desktopentry-perl libfile-mimeinfo-perl libfontenc1 libgl1-mesa-glx libglapi-mesa libgnutls-deb0-28 libgtk-3-0 libgtk-3-bin libgtk-3-common libhogweed2 libindicator3-7 libjson-glib-1.0-0 libjson-glib-1.0-common libnettle4 libnspr4 libnss3 libproxy1 librest-0.7-0 libsoup-gnome2.4-1 libsoup2.4-1 libwayland-client0 libwayland-cursor0 libx11-protocol-perl libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-shape0 libxcb-sync1 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxmu6 libxmuu1 libxpm4 libxrandr2 libxshmfence1 libxtst6 libxv1 libxxf86dga1 libxxf86vm1 multiarch-support x11-utils x11-xserver-utils xdg-utils xkb-data libgconf2-4 lsb-release && \
dpkg -i 77.0.3865.120_amd64.deb && \
wget -c http://npm.taobao.org/mirrors/chromedriver/LATEST_RELEASE
RUN wget -c https://npm.taobao.org/mirrors/chromedriver/$CDV/chromedriver_linux64.zip && \
apt-get install -y unzip && \
unzip chromedriver_linux64.zip
ENV DEBIAN_FRONTEND noninteractive
ENV TZ Asia/Shanghai
## 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" ]