Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +11 -5
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
# Fresh build 2025-04-23
|
| 2 |
FROM ubuntu:20.04
|
| 3 |
|
| 4 |
# Set working directory
|
|
@@ -6,7 +6,8 @@ WORKDIR /app
|
|
| 6 |
|
| 7 |
# Set environment variables to avoid interactive prompts
|
| 8 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 9 |
-
ENV PATH=/usr/local/bin:/usr/bin:/bin:$PATH
|
|
|
|
| 10 |
|
| 11 |
# Install system dependencies for Chrome and ChromeDriver
|
| 12 |
RUN apt-get update && apt-get install -y \
|
|
@@ -38,6 +39,9 @@ RUN apt-get update && apt-get install -y \
|
|
| 38 |
libncurses5 \
|
| 39 |
libx11-6 \
|
| 40 |
libxext6 \
|
|
|
|
|
|
|
|
|
|
| 41 |
&& rm -rf /var/lib/apt/lists/*
|
| 42 |
|
| 43 |
# Install Google Chrome
|
|
@@ -48,8 +52,9 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key
|
|
| 48 |
&& rm -rf /var/lib/apt/lists/* \
|
| 49 |
|| (echo "Chrome installation failed" && exit 1)
|
| 50 |
|
| 51 |
-
# Verify Chrome installation
|
| 52 |
-
RUN google-chrome
|
|
|
|
| 53 |
|
| 54 |
# Install ChromeDriver matching Chrome version
|
| 55 |
RUN CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+') \
|
|
@@ -62,7 +67,8 @@ RUN CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+') \
|
|
| 62 |
|| (echo "ChromeDriver installation failed" && exit 1)
|
| 63 |
|
| 64 |
# Verify ChromeDriver installation
|
| 65 |
-
RUN chromedriver
|
|
|
|
| 66 |
|
| 67 |
# Clear Selenium cache to avoid outdated ChromeDriver
|
| 68 |
RUN rm -rf /home/user/.cache/selenium
|
|
|
|
| 1 |
+
# Fresh build 2025-04-23 v6 to force rebuild
|
| 2 |
FROM ubuntu:20.04
|
| 3 |
|
| 4 |
# Set working directory
|
|
|
|
| 6 |
|
| 7 |
# Set environment variables to avoid interactive prompts
|
| 8 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 9 |
+
ENV PATH=/usr/local/bin:/usr/bin:/bin:/usr/lib/chromium-browser:$PATH
|
| 10 |
+
ENV BUILD_ID=2025-04-23-v6
|
| 11 |
|
| 12 |
# Install system dependencies for Chrome and ChromeDriver
|
| 13 |
RUN apt-get update && apt-get install -y \
|
|
|
|
| 39 |
libncurses5 \
|
| 40 |
libx11-6 \
|
| 41 |
libxext6 \
|
| 42 |
+
libxcomposite1 \
|
| 43 |
+
libxrandr2 \
|
| 44 |
+
libgcc1 \
|
| 45 |
&& rm -rf /var/lib/apt/lists/*
|
| 46 |
|
| 47 |
# Install Google Chrome
|
|
|
|
| 52 |
&& rm -rf /var/lib/apt/lists/* \
|
| 53 |
|| (echo "Chrome installation failed" && exit 1)
|
| 54 |
|
| 55 |
+
# Verify Chrome installation and binary location
|
| 56 |
+
RUN which google-chrome || (echo "google-chrome binary not found" && exit 1)
|
| 57 |
+
RUN google-chrome --version || (echo "Cannot run google-chrome" && exit 1)
|
| 58 |
|
| 59 |
# Install ChromeDriver matching Chrome version
|
| 60 |
RUN CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+') \
|
|
|
|
| 67 |
|| (echo "ChromeDriver installation failed" && exit 1)
|
| 68 |
|
| 69 |
# Verify ChromeDriver installation
|
| 70 |
+
RUN which chromedriver || (echo "chromedriver binary not found" && exit 1)
|
| 71 |
+
RUN chromedriver --version || (echo "Cannot run chromedriver" && exit 1)
|
| 72 |
|
| 73 |
# Clear Selenium cache to avoid outdated ChromeDriver
|
| 74 |
RUN rm -rf /home/user/.cache/selenium
|