-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathDockerfile.test
More file actions
65 lines (55 loc) · 1.88 KB
/
Dockerfile.test
File metadata and controls
65 lines (55 loc) · 1.88 KB
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
FROM latera/homs_base:latest
USER root
RUN apt-get update && \
apt-get install -y \
libfontconfig1 \
libfontconfig1-dev \
libfreetype6 \
libfreetype6-dev \
libqt5webkit5-dev
RUN apt-get update && \
apt-get install -y \
fonts-liberation \
gstreamer1.0-plugins-base \
gstreamer1.0-tools \
gstreamer1.0-x \
libayatana-indicator7 \
libasound2 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libu2f-udev \
libxss1 \
libxtst6 \
unzip \
jq \
xdg-utils \
zip
ARG CHROME_DEB_LINK
RUN CFT_JSON=https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json && \
CHROME_URL=$(curl -fsSL "$CFT_JSON" | jq -r '.channels.Stable.downloads.chrome[] | select(.platform=="linux64") | .url') && \
DRIVER_URL=$(curl -fsSL "$CFT_JSON" | jq -r '.channels.Stable.downloads.chromedriver[] | select(.platform=="linux64") | .url') && \
curl -fsSL "$CHROME_URL" -o chrome.zip && \
curl -fsSL "$DRIVER_URL" -o chromedriver.zip && \
unzip -q chrome.zip -d /opt && \
unzip -q chromedriver.zip -d /opt && \
ln -s /opt/chrome-linux64/chrome /usr/local/bin/google-chrome && \
ln -s /opt/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver && \
chmod +x /opt/chrome-linux64/chrome /opt/chromedriver-linux64/chromedriver && \
rm -f chrome.zip chromedriver.zip
COPY --chown=homs ./run_tests.sh ./.rubocop.yml ./.rubocop_todo.yml /
COPY --chown=homs ./.rubocop.yml ./.rubocop_todo.yml ./jest.config.js /opt/homs/
USER homs
ARG YARN_REGISTRY
RUN if [ -n "$YARN_REGISTRY" ]; then \
yarn config set npmRegistryServer "$YARN_REGISTRY"; \
fi
ARG RUBYGEMS_MIRROR
RUN if [ -n "$RUBYGEMS_MIRROR" ]; then \
bundle config mirror.https://rubygems.org "$RUBYGEMS_MIRROR"; \
fi
RUN yarn install && \
bundle config set --local without 'oracle' && \
bundle config set --local with 'test' && \
bundle install
ENTRYPOINT ["/run_tests.sh"]