-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
72 lines (51 loc) · 2.03 KB
/
Dockerfile
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM ubuntu:16.04
MAINTAINER Roberto Sanchez <r.sanchezavalos@gmail.com>
ENV REFRESHED_AT 2017-05-21
ENV version=2.7.12
ENV CHROMEDRIVER_URL=http://chromedriver.storage.googleapis.com/2.25/chromedriver_linux64.zip
RUN apt-get update && \
apt-get install -y --no-install-recommends apt-utils
RUN apt-get -y install python-pip
RUN apt-get --yes update
RUN apt-get --yes install chromium-chromedriver
RUN apt-get update; \
apt-get --yes install build-essential checkinstall && \
apt-get --yes install libxss1 libappindicator1 libindicator7 && \
apt-get --yes install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev && \
apt-get --yes install wget unzip curl xvfb xz-utils zlib1g-dev libssl-dev
RUN apt-get --yes install libxss1 libappindicator1 libindicator7 libpango1.0-0 fonts-liberation
#==================
# Python 2.7.12
#==================
RUN wget https://www.python.org/ftp/python/$version/Python-$version.tgz && \
tar -xvf Python-$version.tgz && \
cd Python-$version && \
./configure && \
make && \
make altinstall && \
alias python=python2.7
RUN apt-get update && apt-get install -y \
python \
python-dev\
python-distribute \
ipython \
unzip
#==================
# Google ChromeDriver
#==================
RUN apt-get --yes install libxss1 libappindicator1 libindicator7 && \
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb &&\
dpkg -i google-chrome*.deb
RUN apt-get --yes install -f && \
apt-get --yes install xvfb && \
apt-get --yes install unzip
RUN wget -N http://chromedriver.storage.googleapis.com/2.26/chromedriver_linux64.zip &&\
unzip chromedriver_linux64.zip &&\
chmod +x chromedriver
RUN mv -f chromedriver /usr/local/share/chromedriver &&\
ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver &&\
ln -s /usr/local/share/chromedriver /usr/bin/chromedriver &&\
apt-get --yes install python-pip
ADD requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
CMD [ "/bin/bash" ]