17 lines
448 B
Docker
17 lines
448 B
Docker
FROM python:3.9-slim
|
|
|
|
# On force la racine du projet comme répertoire de travail
|
|
WORKDIR /app
|
|
|
|
# On installe les dépendances
|
|
COPY app/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# On copie TOUT le contenu du dossier local app dans le WORKDIR (/app)
|
|
COPY app/ .
|
|
|
|
# Exposer le port
|
|
EXPOSE 8000
|
|
|
|
# On lance avec le chemin complet explicite
|
|
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] |