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
2121
2222USER seluser
2323
24- #==================
24+ #============================================
2525# 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 \
2934 && rm -rf /opt/selenium/chromedriver \
3035 && unzip /tmp/chromedriver_linux64.zip -d /opt/selenium \
3136 && 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
3540
3641COPY generate_config /opt/bin/generate_config
3742
You can’t perform that action at this time.
0 commit comments