-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (59 loc) · 1.87 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
FROM ubuntu:latest
# Step 2
# Essential tools and xvfb
RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata
RUN apt-get install -y \
software-properties-common \
unzip \
curl \
xvfb \
wget \
libfontconfig \
gnupg \
--no-install-recommends apt-utils \
python3-pip \
default-jre-headless \
libxml2-dev \
libxslt-dev \
zlib1g-dev \
net-tools \
default-jre \
default-jdk \
zip \
unzip \
build-essential \
autoconf \
libtool \
pkg-config \
python3-dev \
libglib2.0-0 \
apt-utils \
libgl1-mesa-dev \
libaspell-dev aspell \
python3-setuptools
# Install Chrome / Puppeteer dependencies
RUN apt-get install -y libpangocairo-1.0-0 \
libx11-xcb1 libxcomposite1 libxdamage1 \
libxi6 libxtst6 libnss3 libcups2 libxss1 \
libxrandr2 libasound2 libatk1.0-0 libgtk-3-0
# Step 3 - Setup Browsers
# Install PhantomJS
RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
RUN tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/
RUN ln -sf /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin
# Install Selenium driver dependency: Chrome
RUN echo 'deb http://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/google-chrome.list &&\
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&\
apt-get update &&\
apt-get -y install google-chrome-stable
# Install Selenium Chromedriver
RUN apt-get -y install unzip &&\
wget -q https://chromedriver.storage.googleapis.com/85.0.4183.87/chromedriver_linux64.zip &&\
unzip chromedriver_linux64.zip &&\
mv chromedriver /usr/bin/chromedriver &&\
chown root:root /usr/bin/chromedriver &&\
chmod +x /usr/bin/chromedriver &&\
rm chromedriver_linux64.zip
# Install Chromium-browser
RUN apt-get -y install chromium-browser