Skip to content

Commit 0b86041

Browse files
authored
Merge pull request #3 from rofrano/add-firefox
Added firefox driver
2 parents 5b7600e + 9b1c961 commit 0b86041

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ FROM rofrano/nyu-devops-base:sp23
44
# This build image needs to be root
55
USER root
66

7+
# Install Selenium, Chrome and Firefox
78
RUN apt-get update && \
8-
apt-get install -y chromium-driver python3-selenium
9+
apt-get install -y --no-install-recommends ca-certificates chromium-driver firefox-esr python3-selenium
910

10-
WORKDIR /app
11+
# Install platform specific tools
12+
COPY install-tools.sh /tmp/
13+
RUN cd /tmp && bash ./install-tools.sh
1114

15+
WORKDIR /app
1216
CMD ["/bin/bash"]

install-tools.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
######################################################################
3+
# This script installs tools that are platform specific
4+
######################################################################
5+
6+
echo "**********************************************************************"
7+
echo "Installing Gecko Driver..."
8+
echo "**********************************************************************"
9+
10+
if [ $(uname -m) == aarch64 ]; then
11+
echo "ARM64 platform detected."
12+
wget -qO - https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux-aarch64.tar.gz | tar xz
13+
else
14+
echo "x86_64 platform detected."
15+
wget -qO - https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux64.tar.gz | tar xz
16+
fi;
17+
sudo install geckodriver /usr/bin/
18+
rm geckodriver

0 commit comments

Comments
 (0)