FROM python:3.11-alpine

WORKDIR /app

# Installer les dépendances
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt


COPY app.py .

# Créer un utilisateur non privilégié
RUN adduser -D appuser
USER appuser

# Exposer le port sur lequel l'application s'exécute
EXPOSE 5000
CMD ["python3", "app.py"]