# Dockerfile for running Axe Selenium with Python # Use the official Python image as the base image FROM python:3.9 # Set the working directory WORKDIR /app # Install Chrome and dependencies RUN apt-get update && apt-get install -y \ wget \ gnupg \ && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \ && apt-get update && apt-get install -y \ google-chrome-stable \ && rm -rf /var/lib/apt/lists/* # Install ChromeDriver (adjust version as needed) RUN wget -O /usr/local/bin/chromedriver https://chromedriver.storage.googleapis.com/94.0.4606.61/chromedriver_linux64.zip \ && unzip -o /usr/local/bin/chromedriver -d /usr/local/bin/ # Install required Python packages RUN pip install selenium axe-selenium-python gradio # Set environment variables for Chrome ENV CHROME_BIN=/usr/bin/google-chrome # Copy your Python script into the container COPY my_axe_test.py . RUN ls -l /app RUN chmod 755 /app # Set the entry point (modify as needed) CMD ["python", "my_axe_test.py"] #RUN sudo python /app/my_axe_test.py