File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,22 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key
21
21
22
22
USER seluser
23
23
24
- #==================
24
+ #============================================
25
25
# Chrome webdriver
26
- #==================
27
- ARG CHROME_DRIVER_VERSION=2.31
28
- RUN wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \
26
+ #============================================
27
+ # can specify versions by CHROME_DRIVER_VERSION
28
+ # Latest released version will be used by default
29
+ #============================================
30
+ ARG CHROME_DRIVER_VERSION="latest"
31
+ RUN CD_VERSION=$(if [ ${CHROME_DRIVER_VERSION:-latest} = "latest" ]; then echo $(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE); else echo $CHROME_DRIVER_VERSION; fi) \
32
+ && echo "Using chromedriver version: "$CD_VERSION \
33
+ && wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CD_VERSION/chromedriver_linux64.zip \
29
34
&& rm -rf /opt/selenium/chromedriver \
30
35
&& unzip /tmp/chromedriver_linux64.zip -d /opt/selenium \
31
36
&& rm /tmp/chromedriver_linux64.zip \
32
- && mv /opt/selenium/chromedriver /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION \
33
- && chmod 755 /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION \
34
- && sudo ln -fs /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION /usr/bin/chromedriver
37
+ && mv /opt/selenium/chromedriver /opt/selenium/chromedriver-$CD_VERSION \
38
+ && chmod 755 /opt/selenium/chromedriver-$CD_VERSION \
39
+ && sudo ln -fs /opt/selenium/chromedriver-$CD_VERSION /usr/bin/chromedriver
35
40
36
41
COPY generate_config /opt/bin/generate_config
37
42
You can’t perform that action at this time.
0 commit comments