forked from Blazemeter/taurus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
78 lines (71 loc) · 2.95 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
73
74
75
76
77
78
FROM ubuntu:16.04
ENV CHROMEDRIVER_VERSION=2.28
ENV GECKODRIVER_VERSION=0.15.0
ADD https://s3.amazonaws.com/deployment.blazemeter.com/jobs/taurus-pbench/10/blazemeter-pbench-extras_0.1.10.1_amd64.deb /tmp
ADD https://dl-ssl.google.com/linux/linux_signing_key.pub /tmp
ADD https://deb.nodesource.com/setup_6.x /tmp
RUN apt-get -y update \
&& apt-get -y install --no-install-recommends software-properties-common \
&& apt-add-repository multiverse \
&& add-apt-repository ppa:yandex-load/main \
&& apt-add-repository ppa:nilarimogard/webupd8 \
&& cat /tmp/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
&& bash /tmp/setup_6.x \
&& apt-get -y update \
&& apt-cache policy firefox \
&& apt-get -y install --no-install-recommends \
kmod \
unzip \
build-essential \
libxslt1-dev \
zlib1g-dev \
libxi6 \
libgconf-2-4 \
libexif12 \
udev \
python-dev \
python-pip \
default-jdk \
xvfb \
libyaml-dev \
siege \
tsung \
apache2-utils \
phantom \
phantom-ssl \
firefox \
google-chrome-stable \
pepperflashplugin-nonfree \
flashplugin-installer \
phantomjs \
ruby ruby-dev \
nodejs \
&& pip install --upgrade setuptools pip \
&& pip install locustio bzt && pip uninstall -y bzt \
&& pip install --upgrade selenium \
&& npm install -g mocha \
&& gem install rspec \
&& gem install selenium-webdriver \
&& dpkg -i /tmp/blazemeter-pbench-extras_0.1.10.1_amd64.deb \
&& wget http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip -P /tmp \
&& unzip -d /usr/bin /tmp/chromedriver_linux64.zip \
&& wget https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz -P /tmp \
&& tar -xzf /tmp/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz --directory /usr/local/bin \
&& apt-get clean \
&& firefox --version && google-chrome-stable --version && /usr/bin/chromedriver --version && geckodriver --version
COPY bzt/resources/chrome_launcher.sh /tmp
RUN mv /opt/google/chrome/google-chrome /opt/google/chrome/_google-chrome \
&& mv /tmp/chrome_launcher.sh /opt/google/chrome/google-chrome \
&& chmod +x /opt/google/chrome/google-chrome
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
COPY . /tmp/bzt-src
RUN pip install /tmp/bzt-src \
&& echo '{"install-id": "Docker"}' > /etc/bzt.d/99-zinstallID.json \
&& echo '{"settings": {"artifacts-dir": "/tmp/artifacts"}}' > /etc/bzt.d/90-artifacts-dir.json
RUN bzt -install-tools && bzt /tmp/bzt-src/examples/all-executors.yml -o settings.artifacts-dir=/tmp/all-executors-artifacts -sequential || (cat /tmp/all-executors-artifacts/webdriver-1.log; exit 1)
RUN mkdir /bzt-configs \
&& rm -rf /tmp/* \
&& mkdir /tmp/artifacts
WORKDIR /bzt-configs
ENTRYPOINT ["sh", "-c", "bzt -l /tmp/artifacts/bzt.log \"$@\"", "ignored"]