Files
PeopleCounter/Dockerfile
2026-01-21 12:06:04 +01:00

23 lines
437 B
Docker

FROM python:3.9-slim
# Install system dependencies required for OpenCV
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port 5000
EXPOSE 5000
# Run the application
CMD ["python", "app.py"]