-
Notifications
You must be signed in to change notification settings - Fork 33
/
Dockerfile
62 lines (48 loc) · 1.85 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
FROM debian:testing
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# ffmpeg is hosted at deb-multimedia.org
RUN curl http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb \
-o /tmp/deb-multimedia-keyring.deb && \
dpkg -i /tmp/deb-multimedia-keyring.deb && \
rm /tmp/deb-multimedia-keyring.deb && \
echo "deb http://www.deb-multimedia.org stretch main non-free" >> /etc/apt/sources.list
RUN apt-get update && \
apt-get install -y \
openjdk-8-jre \
xvfb \
libgconf-2-4 \
libexif12 \
chromium \
npm \
supervisor \
netcat-traditional \
curl \
ffmpeg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/nodejs /usr/bin/node
# Upgrade NPM to latest (address issue #3)
RUN npm install -g npm
# Install Protractor
RUN npm install -g [email protected]
# Install Selenium and Chrome driver
RUN webdriver-manager update
# Add a non-privileged user for running Protrator
RUN adduser --home /project --uid 1100 \
--disabled-login --disabled-password --gecos node node
# Add main configuration file
ADD supervisor.conf /etc/supervisor/supervisor.conf
# Add service defintions for Xvfb, Selenium and Protractor runner
ADD supervisord/*.conf /etc/supervisor/conf.d/
# By default, tests in /data directory will be executed once and then the container
# will quit. When MANUAL envorinment variable is set when starting the container,
# tests will NOT be executed and Xvfb and Selenium will keep running.
ADD bin/run-protractor /usr/local/bin/run-protractor
# Container's entry point, executing supervisord in the foreground
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisor.conf"]
# Protractor test project needs to be mounted at /project
VOLUME ["/project"]