Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.

Commit 07b9818

Browse files
committed
Add Dockerfile.older.browser example on how to install older browsers
1 parent d563c1b commit 07b9818

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Dockerfile.older.browser

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# docker-selenium tags are pointer based, for instance:
2+
# latest now points to 3 that points to 3.5 that points to 3.5.0 that points to 3.5.0-p1
3+
# 3.3 points to 3.3.1 that points to 3.3.1-p27
4+
# and so on
5+
FROM elgalu/selenium:3.5
6+
7+
USER root
8+
9+
# In order to install an older chrome we need to:
10+
# 1. identify the git tag of the release that has that .deb version file
11+
# e.g. 3.3.1-p22
12+
# 2. grab the .deb download url
13+
# e.g. https://github.com/elgalu/....../google-chrome-stable_60.0.3112.101_amd64.deb
14+
RUN mkdir -p /home/seluser/chrome-deb \
15+
&& cd /home/seluser/chrome-deb \
16+
&& wget -O "older_chrome.deb" -nv \
17+
"https://github.com/elgalu/docker-selenium/releases/download/3.3.1-p22/google-chrome-stable_60.0.3112.101_amd64.deb"
18+
19+
# Installing the deb file will upgrade replace existing Chrome with the one we need
20+
RUN cd /home/seluser/chrome-deb \
21+
&& dpkg -i "older_chrome.deb" \
22+
&& rm "older_chrome.deb" \
23+
&& apt-get -qyy autoremove \
24+
&& rm -rf /var/lib/apt/lists/* \
25+
&& apt-get -qyy clean \
26+
&& export CH_STABLE_VER=$(/usr/bin/google-chrome-stable --version | grep -iEo "${GREP_ONLY_NUMS_VER}") \
27+
&& echo "${CH_STABLE_VER}"
28+
29+
# Restore default user
30+
USER seluser

0 commit comments

Comments
 (0)