Initial commit
This commit is contained in:
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
# Usar una imagen base de Python
|
||||
FROM python:3.9-slim
|
||||
|
||||
# Instalar dependencias del sistema necesarias para OpenCV y zbar
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libzbar0 \
|
||||
libgl1-mesa-glx \
|
||||
libglib2.0-0 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Directorio de trabajo
|
||||
WORKDIR /app
|
||||
|
||||
# Copiar requirements.txt primero para aprovechar la caché de Docker
|
||||
COPY requirements.txt .
|
||||
|
||||
# Instalar dependencias de Python
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copiar el código fuente
|
||||
COPY . .
|
||||
|
||||
# Comando para ejecutar la aplicación
|
||||
CMD ["python", "qr_detector.py"]
|
||||
Reference in New Issue
Block a user