Closed ChandrasekarGenesys closed 12 months ago
Dockerfile
FROM maven:3.8.6-jdk-11
ARG CHROME_VERSION="google-chrome-stable" RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \ && apt-get update -qqy \ && apt-get -qqy install \ ${CHROME_VERSION:-google-chrome-stable} \ && rm /etc/apt/sources.list.d/google-chrome.list \ && rm -rf /var/lib/apt/lists/ /var/cache/apt/ \ && sed -i 's/"$HERE\/chrome"/"$HERE\/chrome" --no-sandbox/g' /opt/google/chrome/google-chrome
ARG CHROME_DRIVER_VERSION RUN if [ -z "$CHROME_DRIVER_VERSION" ]; \ then CHROME_MAJOR_VERSION=114 \ && CHROME_DRIVER_VERSION=$(wget --no-verbose -O - "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}"); \ fi \ && echo "Using chromedriver version: "$CHROME_DRIVER_VERSION \ && wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \ && rm -rf /opt/chromedriver \ && unzip /tmp/chromedriver_linux64.zip -d /opt \ && rm /tmp/chromedriver_linux64.zip \ && mv /opt/chromedriver /opt/chromedriver-$CHROME_DRIVER_VERSION \ && chmod 755 /opt/chromedriver-$CHROME_DRIVER_VERSION \ && ln -fs /opt/chromedriver-$CHROME_DRIVER_VERSION /usr/local/sbin/chromedriver
Try building the above Dockerfile but getting the following error as there is no 116 version released
Error: ---> Running in 2b6b9bcf22af https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116: 2023-08-24 09:37:26 ERROR 404: Not Found.
chromedriver should be installed with latest release 116
chromedriver for 116 version is not present, so docker build failed
Chrome for testing changed the locations of drivers for download.
Please read the Readme for current recommendations. https://github.com/titusfortner/webdrivers#update-future-of-this-project
Summary
Dockerfile
FROM maven:3.8.6-jdk-11
ARG CHROME_VERSION="google-chrome-stable" RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list \ && apt-get update -qqy \ && apt-get -qqy install \ ${CHROME_VERSION:-google-chrome-stable} \ && rm /etc/apt/sources.list.d/google-chrome.list \ && rm -rf /var/lib/apt/lists/ /var/cache/apt/ \ && sed -i 's/"$HERE\/chrome"/"$HERE\/chrome" --no-sandbox/g' /opt/google/chrome/google-chrome
ChromeDriver
ARG CHROME_DRIVER_VERSION RUN if [ -z "$CHROME_DRIVER_VERSION" ]; \ then CHROME_MAJOR_VERSION=114 \ && CHROME_DRIVER_VERSION=$(wget --no-verbose -O - "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_MAJOR_VERSION}"); \ fi \ && echo "Using chromedriver version: "$CHROME_DRIVER_VERSION \ && wget --no-verbose -O /tmp/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \ && rm -rf /opt/chromedriver \ && unzip /tmp/chromedriver_linux64.zip -d /opt \ && rm /tmp/chromedriver_linux64.zip \ && mv /opt/chromedriver /opt/chromedriver-$CHROME_DRIVER_VERSION \ && chmod 755 /opt/chromedriver-$CHROME_DRIVER_VERSION \ && ln -fs /opt/chromedriver-$CHROME_DRIVER_VERSION /usr/local/sbin/chromedriver
Debug Info
Try building the above Dockerfile but getting the following error as there is no 116 version released
Error: ---> Running in 2b6b9bcf22af https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116: 2023-08-24 09:37:26 ERROR 404: Not Found.
Expected Behavior
chromedriver should be installed with latest release 116
Actual Behavior
chromedriver for 116 version is not present, so docker build failed