Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -2
Dockerfile
CHANGED
|
@@ -1,19 +1,24 @@
|
|
| 1 |
# Use Python as the base image
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
-
# Install dependencies
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
curl \
|
| 7 |
unixodbc \
|
| 8 |
unixodbc-dev \
|
| 9 |
apt-transport-https \
|
| 10 |
-
gnupg
|
|
|
|
|
|
|
| 11 |
|
| 12 |
# Add Microsoft repository and install ODBC Driver 17
|
| 13 |
RUN curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
|
| 14 |
RUN echo "deb [arch=amd64] https://packages.microsoft.com/debian/11/prod bookworm main" > /etc/apt/sources.list.d/mssql-release.list
|
| 15 |
RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql17
|
| 16 |
|
|
|
|
|
|
|
|
|
|
| 17 |
# Set working directory
|
| 18 |
WORKDIR /home/user/app
|
| 19 |
|
|
|
|
| 1 |
# Use Python as the base image
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
+
# Install system dependencies
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
curl \
|
| 7 |
unixodbc \
|
| 8 |
unixodbc-dev \
|
| 9 |
apt-transport-https \
|
| 10 |
+
gnupg \
|
| 11 |
+
libodbc1 \
|
| 12 |
+
odbcinst
|
| 13 |
|
| 14 |
# Add Microsoft repository and install ODBC Driver 17
|
| 15 |
RUN curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
|
| 16 |
RUN echo "deb [arch=amd64] https://packages.microsoft.com/debian/11/prod bookworm main" > /etc/apt/sources.list.d/mssql-release.list
|
| 17 |
RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql17
|
| 18 |
|
| 19 |
+
# Verify installation
|
| 20 |
+
RUN ls -l /usr/lib/x86_64-linux-gnu/ | grep odbc
|
| 21 |
+
|
| 22 |
# Set working directory
|
| 23 |
WORKDIR /home/user/app
|
| 24 |
|