-
Notifications
You must be signed in to change notification settings - Fork 258
/
Copy pathDockerfile
28 lines (23 loc) · 821 Bytes
/
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
FROM alpine:latest
RUN \
# Use edge repos
echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN \
# Install Firefox
apk update && apk upgrade && \
apk add firefox xvfb bash dbus ttf-freefont fontconfig && \
rm -rf /var/cache/apk/*
RUN \
# Create firefox + xvfb runner
mv /usr/bin/firefox /usr/bin/firefox-origin && \
echo $'#!/usr/bin/env sh\n\
Xvfb :0 -screen 0 1920x1080x24 -ac +extension GLX +render -noreset & \n\
DISPLAY=:0.0 firefox-origin $@ \n\
killall Xvfb' > /usr/bin/firefox && \
chmod +x /usr/bin/firefox
# Install slimerjs
COPY . /usr/local/slimerjs
WORKDIR /usr/local/slimerjs
CMD "test/run_tests"