rdlf commited on
Commit
3c89ec6
verified
1 Parent(s): efdb78e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -13
Dockerfile CHANGED
@@ -1,13 +1,33 @@
1
- # Base image
2
- FROM selenium/standalone-chrome
3
-
4
- # Access to the project within the Docker container
5
- COPY ./seleniumTest/project /app
6
-
7
- # Install Node.js
8
- RUN sudo apt-get update
9
- RUN sudo apt-get install --yes curl python3 python3-pip
10
- RUN curl --silent --location https://deb.nodesource.com/setup
11
- RUN pip3 install --no-cache-dir --upgrade pip
12
- RUN pip3 install --no-cache-dir med2image
13
- RUN pip install -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile for running Axe Selenium with Python
2
+
3
+ # Use the official Python image as the base image
4
+ FROM python:3.9
5
+
6
+ # Set the working directory
7
+ WORKDIR /app
8
+
9
+ # Install Chrome and dependencies
10
+ RUN apt-get update && apt-get install -y \
11
+ wget \
12
+ gnupg \
13
+ && wget -q -O - [^1^][1](https://dl-ssl.google.com/linux/linux_signing_key.pub) | apt-key add - \
14
+ && echo "deb [arch=amd64] [^2^][2](http://dl.google.com/linux/chrome/deb/) stable main" > /etc/apt/sources.list.d/google-chrome.list \
15
+ && apt-get update && apt-get install -y \
16
+ google-chrome-stable \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
+ # Install ChromeDriver (adjust version as needed)
20
+ RUN wget -O /usr/local/bin/chromedriver [^3^][3](https://chromedriver.storage.googleapis.com/94.0.4606.61/chromedriver_linux64.zip) \
21
+ && unzip /usr/local/bin/chromedriver -d /usr/local/bin/
22
+
23
+ # Install required Python packages
24
+ RUN pip install selenium axe-selenium-python gradio
25
+
26
+ # Set environment variables for Chrome
27
+ ENV CHROME_BIN=/usr/bin/google-chrome
28
+
29
+ # Copy your Python script into the container
30
+ COPY my_axe_test.py .
31
+
32
+ # Set the entry point (modify as needed)
33
+ CMD ["python", "my_axe_test.py"]