SQL_Agent / Dockerfile
Aidahaouas's picture
Update Dockerfile
e585ffd verified
raw
history blame
908 Bytes
# Utiliser une image de base avec Python
FROM python:3.9-slim
# Installer les dépendances système
RUN apt-get update && \
apt-get install -y --no-install-recommends \
unixodbc \
unixodbc-dev \
curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Installer le pilote ODBC pour SQL Server
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/debian/11/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install -y msodbcsql17 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copier le fichier requirements.txt et installer les dépendances Python
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copier le reste de l'application
COPY . .
# Commande pour lancer l'application
CMD ["python", "app.py"]