iptvrd commited on
Commit
cf928cf
verified
1 Parent(s): 0b90c96

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +39 -0
Dockerfile ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # Configurar directorio de trabajo
4
+ WORKDIR /app
5
+
6
+ # Instalar dependencias del sistema
7
+ RUN apt-get update && apt-get install -y \
8
+ wget \
9
+ gnupg \
10
+ curl \
11
+ unzip \
12
+ xvfb \
13
+ libxi6 \
14
+ libgconf-2-4 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Instalar Google Chrome
18
+ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
19
+ && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list \
20
+ && apt-get update \
21
+ && apt-get install -y google-chrome-stable \
22
+ && rm -rf /var/lib/apt/lists/*
23
+
24
+ # Copiar archivos del proyecto
25
+ COPY . /app/
26
+
27
+ # Instalar dependencias de Python
28
+ RUN pip install --no-cache-dir -r requirements.txt
29
+
30
+ # Configurar variables de entorno
31
+ ENV PYTHONUNBUFFERED=1 \
32
+ PORT=7860 \
33
+ CHROME_DRIVER_PATH=/usr/bin/chromedriver
34
+
35
+ # Exponer puerto
36
+ EXPOSE 7860
37
+
38
+ # Comando para iniciar la aplicaci贸n
39
+ CMD ["python", "app.py"]