hamza2923 commited on
Commit
c1c51a7
·
verified ·
1 Parent(s): d337651

Update dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +3 -24
dockerfile CHANGED
@@ -1,38 +1,17 @@
1
- # Use Python 3.9 slim
2
  FROM python:3.9-slim
3
 
4
- # Install system dependencies
5
  RUN apt-get update && apt-get install -y \
6
  wget \
7
  gnupg \
8
- fonts-liberation \
9
- libasound2 \
10
- libatk-bridge2.0-0 \
11
- libatk1.0-0 \
12
- libatspi2.0-0 \
13
- libcups2 \
14
- libdbus-1-3 \
15
- libdrm2 \
16
- libgbm1 \
17
- libgtk-3-0 \
18
- libnspr4 \
19
- libnss3 \
20
- libxcomposite1 \
21
- libxdamage1 \
22
- libxfixes3 \
23
- libxkbcommon0 \
24
- libxrandr2 \
25
- xdg-utils \
26
  && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
27
  && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
28
  && apt-get update \
29
  && apt-get install -y google-chrome-stable \
30
  && rm -rf /var/lib/apt/lists/*
31
 
32
- # Install ChromeDriver (specific matching version)
33
- RUN CHROME_MAJOR_VERSION=$(google-chrome-stable --version | awk '{print $3}' | cut -d'.' -f1) \
34
- && CHROMEDRIVER_VERSION=$(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_MAJOR_VERSION) \
35
- && wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip \
36
  && unzip /tmp/chromedriver.zip -d /usr/bin/ \
37
  && chmod +x /usr/bin/chromedriver \
38
  && rm /tmp/chromedriver.zip
 
 
1
  FROM python:3.9-slim
2
 
3
+ # Install system dependencies and Chrome
4
  RUN apt-get update && apt-get install -y \
5
  wget \
6
  gnupg \
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
8
  && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
9
  && apt-get update \
10
  && apt-get install -y google-chrome-stable \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Install ChromeDriver (specific version)
14
+ RUN wget -q -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/114.0.5735.90/chromedriver_linux64.zip \
 
 
15
  && unzip /tmp/chromedriver.zip -d /usr/bin/ \
16
  && chmod +x /usr/bin/chromedriver \
17
  && rm /tmp/chromedriver.zip