forked from cliqz-oss/browser-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ci
120 lines (104 loc) · 3.07 KB
/
Dockerfile.ci
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
FROM node:9.11.1-stretch
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update --no-install-recommends \
&& apt-get install -y \
build-essential \
bzip2 \
ca-certificates \
chromium \
chromium-l10n \
dbus \
jq \
libasound2 \
libatk1.0-0 \
libav-tools \
libavcodec-extra57 \
libc6 \
libcairo-gobject2 \
libcairo2 \
libdbus-1-3 \
libdbus-glib-1-2 \
libfontconfig1 \
libfreetype6 \
libgcc1 \
libgconf-2-4 \
libgdk-pixbuf2.0-0 \
libglib2.0-0 \
libgtk-3-0 \
libgtk2.0-0 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libstartup-notification0 \
libstdc++6 \
libx11-6 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxml2-utils \
libxrender1 \
libxt6 \
lsb-release \
menu \
openbox \
python-dev \
python-pip \
unzip \
wget \
x11vnc \
xauth \
xvfb \
zip \
&& rm -rf /var/lib/apt/lists/*
RUN pip install setuptools==39.2.0
RUN pip install cffi==1.10.0
RUN pip install \
Fabric==1.13.2 \
Jinja2==2.9.6 \
argparse==1.4.0 \
awscli==1.15.32 \
pycrypto==2.6.1 \
requests==2.18.4
RUN cd /tmp && \
wget https://www.openssl.org/source/old/0.9.x/openssl-0.9.8zg.tar.gz && \
tar zxf openssl-0.9.8zg.tar.gz && \
cd openssl-0.9.8zg && \
./config && \
make && \
make install
ENV PATH "/usr/local/ssl/bin:$PATH"
RUN mkdir /app
RUN chown node:node -R /app
# Prevent errors when running xvfb as node user
RUN mkdir /tmp/.X11-unix \
&& chmod 1777 /tmp/.X11-unix \
&& chown root /tmp/.X11-unix
# Expose port for VNC
EXPOSE 5900
USER node
RUN wget https://ftp.mozilla.org/pub/firefox/releases/52.0.2/linux-x86_64/en-US/firefox-52.0.2.tar.bz2 -O /home/node/firefox.tar.bz2 \
&& mkdir /home/node/firefox52 \
&& tar xjvf /home/node/firefox.tar.bz2 -C /home/node/firefox52 \
&& rm -f /home/node/firefox.tar.bz2
RUN wget https://ftp.mozilla.org/pub/devedition/releases/60.0b16/linux-x86_64/en-US/firefox-60.0b16.tar.bz2 -O /home/node/firefox.tar.bz2 \
&& mkdir /home/node/firefox60 \
&& tar xjvf /home/node/firefox.tar.bz2 -C /home/node/firefox60 \
&& rm -f /home/node/firefox.tar.bz2
RUN wget 'https://download.mozilla.org/?product=firefox-devedition-latest&os=linux64&lang=en-US' -O /home/node/firefox.tar.bz2 \
&& mkdir /home/node/firefoxBeta \
&& tar xjvf /home/node/firefox.tar.bz2 -C /home/node/firefoxBeta \
&& rm -f /home/node/firefox.tar.bz2
RUN wget 'https://download.mozilla.org/?product=firefox-nightly-latest&os=linux64&lang=en-US' -O /home/node/firefox.tar.bz2 \
&& mkdir /home/node/firefoxNightly \
&& tar xjvf /home/node/firefox.tar.bz2 -C /home/node/firefoxNightly \
&& rm -f /home/node/firefox.tar.bz2
# Get chrome driver
RUN wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip \
&& rm -rf /app/chromedriver \
&& unzip /tmp/chromedriver_linux64.zip -d /app \
&& rm /tmp/chromedriver_linux64.zip \
&& chmod 755 /app/chromedriver
COPY package.json /app/
COPY bin /app/bin
WORKDIR /app/
RUN npm install