-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
43 lines (36 loc) · 1.12 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
#
# Geckodriver Dockerfile
#
FROM blueimp/basedriver
# Install the latest version of Firefox:
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
# Firefox dependencies:
libgtk-3-0 \
libdbus-glib-1-2 \
bzip2 \
&& DL='https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64' \
&& curl -sL "$DL" | tar -xj -C /opt \
&& ln -s /opt/firefox/firefox /usr/local/bin/ \
# Remove obsolete files:
&& apt-get autoremove --purge -y \
bzip2 \
&& apt-get clean \
&& rm -rf \
/tmp/* \
/usr/share/doc/* \
/var/cache/* \
/var/lib/apt/lists/* \
/var/tmp/*
# Install the latest version of Geckodriver:
RUN BASE_URL=https://github.com/mozilla/geckodriver/releases/download \
&& VERSION=$(curl -sL \
https://api.github.com/repos/mozilla/geckodriver/releases/latest | \
grep tag_name | cut -d '"' -f 4) \
&& curl -sL "$BASE_URL/$VERSION/geckodriver-$VERSION-linux64.tar.gz" | \
tar -xz -C /usr/local/bin
USER webdriver
ENTRYPOINT ["entrypoint", "geckodriver"]
CMD ["--host", "0.0.0.0"]
EXPOSE 4444