Docker image ready to use for perl-Selenium Firefox automation
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
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y \
wget \
xvfb \
firefox \
perl \
lsof \
build-essential \
libxml-parser-perl \
libjson-perl \
libfile-which-perl \
libxml-simple-perl \
libtest-lwp-useragent-perl \
libarchive-zip-perl \
libclone-perl \
libio-string-perl \
libtest-longstring-perl \
libtest-deep-perl \
libtest-fatal-perl \
cpanminus
RUN cpanm install Selenium::Firefox \
&& rm -fr root/.cpanm
# Gecko Driver
ENV GECKODRIVER_VERSION 0.24.0
RUN wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz \
&& rm -rf /opt/geckodriver \
&& tar -C /opt -zxf /tmp/geckodriver.tar.gz \
&& rm /tmp/geckodriver.tar.gz \
&& mv /opt/geckodriver /opt/geckodriver-$GECKODRIVER_VERSION \
&& chmod 755 /opt/geckodriver-$GECKODRIVER_VERSION \
&& ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/geckodriver