RUN apt-get update && \apt-get upgrade -y && \RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install# Install chromedriver for SeleniumRUN curl https://chromedriver.storage.googleapis.com/2.38/chromedriver_linux64.zip -o /usr/local/bin/chromedriverRUN chmod +x /usr/local/bin/chromedriver
System.setProperty("webdriver.chrome.driver", chromeDriverPath);
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setBinary(chromeDriverPath);
chromeOptions.addArguments("--headless");
Webdriver dr = new ChromeDriver(chromeOptions);