Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +9 -2
Dockerfile
CHANGED
|
@@ -32,6 +32,9 @@ RUN apt-get update && apt-get install -y \
|
|
| 32 |
libxss1 \
|
| 33 |
libappindicator3-1 \
|
| 34 |
libindicator3-7 \
|
|
|
|
|
|
|
|
|
|
| 35 |
&& rm -rf /var/lib/apt/lists/*
|
| 36 |
|
| 37 |
# Install Google Chrome
|
|
@@ -43,8 +46,8 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key
|
|
| 43 |
|
| 44 |
# Install ChromeDriver matching Chrome version
|
| 45 |
RUN CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+') \
|
| 46 |
-
&& CHROMEDRIVER_VERSION=$(curl -sS
|
| 47 |
-
&& wget -q https://
|
| 48 |
&& unzip chromedriver_linux64.zip \
|
| 49 |
&& mv chromedriver /usr/local/bin/ \
|
| 50 |
&& chmod +x /usr/local/bin/chromedriver \
|
|
@@ -53,6 +56,10 @@ RUN CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+') \
|
|
| 53 |
# Clear Selenium cache to avoid outdated ChromeDriver
|
| 54 |
RUN rm -rf /home/user/.cache/selenium
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
# Copy requirements and install Python dependencies
|
| 57 |
COPY requirements.txt .
|
| 58 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
| 32 |
libxss1 \
|
| 33 |
libappindicator3-1 \
|
| 34 |
libindicator3-7 \
|
| 35 |
+
libstdc++6 \
|
| 36 |
+
zlib1g \
|
| 37 |
+
libncurses5 \
|
| 38 |
&& rm -rf /var/lib/apt/lists/*
|
| 39 |
|
| 40 |
# Install Google Chrome
|
|
|
|
| 46 |
|
| 47 |
# Install ChromeDriver matching Chrome version
|
| 48 |
RUN CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+') \
|
| 49 |
+
&& CHROMEDRIVER_VERSION=$(curl -sS https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | grep -oP '"version":"${CHROME_VERSION}\.[0-9]+"' | grep -oP '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+') \
|
| 50 |
+
&& wget -q https://storage.googleapis.com/chrome-for-testing-public/${CHROMEDRIVER_VERSION}/linux64/chromedriver-linux64.zip
|
| 51 |
&& unzip chromedriver_linux64.zip \
|
| 52 |
&& mv chromedriver /usr/local/bin/ \
|
| 53 |
&& chmod +x /usr/local/bin/chromedriver \
|
|
|
|
| 56 |
# Clear Selenium cache to avoid outdated ChromeDriver
|
| 57 |
RUN rm -rf /home/user/.cache/selenium
|
| 58 |
|
| 59 |
+
# Debug: Print Chrome and ChromeDriver versions
|
| 60 |
+
RUN google-chrome --version
|
| 61 |
+
RUN chromedriver --version
|
| 62 |
+
|
| 63 |
# Copy requirements and install Python dependencies
|
| 64 |
COPY requirements.txt .
|
| 65 |
RUN pip3 install --no-cache-dir -r requirements.txt
|