ahmetalper commited on
Commit
c759fa8
1 Parent(s): 33ce42e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +37 -13
Dockerfile CHANGED
@@ -1,25 +1,49 @@
1
  # Dockerfile
2
  FROM python:3.9
3
 
4
- RUN apt-get update
5
- RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
6
- RUN dpkg -i google-chrome-stable_current_amd64.deb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
- # Çalışma dizinini belirle
9
  WORKDIR /code
10
 
11
- # Dosyaları kopyala
12
  COPY . .
13
 
14
- # Gereksinimleri yükle
 
 
 
15
  RUN pip install -r requirements.txt
16
 
17
- # Chrome WebDriver'ı yükle
18
- RUN pip install selenium
19
  RUN seleniumbase install chromedriver
20
 
21
- RUN chmod -R 777 .
22
- RUN chmod -R 777 /usr/local/lib/python3.9/site-packages/seleniumbase
23
-
24
- # Uygulamayı başlat
25
- CMD ["python", "main.py"]
 
1
  # Dockerfile
2
  FROM python:3.9
3
 
4
+ # Install necessary dependencies
5
+ RUN apt-get update && \
6
+ apt-get install -y wget gnupg curl && \
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-chrome.list && \
9
+ apt-get update && \
10
+ apt-get install -y google-chrome-stable \
11
+ fonts-liberation \
12
+ libasound2 \
13
+ libatk-bridge2.0-0 \
14
+ libatk1.0-0 \
15
+ libatspi2.0-0 \
16
+ libcups2 \
17
+ libdbus-1-3 \
18
+ libdrm2 \
19
+ libgbm1 \
20
+ libgtk-3-0 \
21
+ libnspr4 \
22
+ libnss3 \
23
+ libu2f-udev \
24
+ libvulkan1 \
25
+ libxcomposite1 \
26
+ libxdamage1 \
27
+ libxfixes3 \
28
+ libxkbcommon0 \
29
+ libxrandr2 \
30
+ xdg-utils
31
 
32
+ # Set the working directory
33
  WORKDIR /code
34
 
35
+ # Copy the application code
36
  COPY . .
37
 
38
+ # Set permissions
39
+ RUN chmod -R 777 .
40
+
41
+ # Install Python dependencies
42
  RUN pip install -r requirements.txt
43
 
44
+ # Install chromedriver
45
+ RUN pip install seleniumbase
46
  RUN seleniumbase install chromedriver
47
 
48
+ # CMD to run the application
49
+ CMD ["python", "main.py"]