Fix Dockerfile backend: usar FreeTDS en vez de driver MS (apt-key deprecado)
This commit is contained in:
@@ -2,21 +2,21 @@ FROM python:3.11-slim
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Dependencias del sistema necesarias para pyodbc (SQL Server) y psycopg2
|
# Dependencias del sistema necesarias para pyodbc (via FreeTDS) y psycopg2
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
unixodbc \
|
unixodbc \
|
||||||
unixodbc-dev \
|
unixodbc-dev \
|
||||||
curl \
|
freetds-dev \
|
||||||
gnupg \
|
freetds-bin \
|
||||||
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
|
tdsodbc \
|
||||||
&& curl https://packages.microsoft.com/config/debian/12/prod.list > /etc/apt/sources.list.d/mssql-release.list \
|
|
||||||
&& apt-get update \
|
|
||||||
&& ACCEPT_EULA=Y apt-get install -y --no-install-recommends msodbcsql18 \
|
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Registrar el driver FreeTDS bajo el nombre "SQL Server" (el que usa data_manager.py)
|
||||||
|
RUN printf "[SQL Server]\nDescription = FreeTDS Driver\nDriver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so\nSetup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so\nFileUsage = 1\n" > /etc/odbcinst.ini
|
||||||
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user