Which Dockerfile snippet correctly installs Google Chrome and ChromeDriver for running Selenium tests headlessly in a CI pipeline?
AFROM python:3.9
RUN pip install selenium
RUN apt-get install google-chrome-stable chromedriver
BFROM python:3.9-slim
RUN apt-get update && apt-get install -y wget unzip \
&& wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& dpkg -i google-chrome-stable_current_amd64.deb || apt-get -f install -y \
&& wget -q https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip \
&& unzip chromedriver_linux64.zip -d /usr/local/bin/ \
&& chmod +x /usr/local/bin/chromedriver
CFROM ubuntu
RUN apt-get update && apt-get install -y chromium-browser chromedriver
DFROM python:3.9
RUN apt-get update && apt-get install -y firefox geckodriver