Do0rMaMu commited on
Commit
097abcd
1 Parent(s): 5e7516e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -3,12 +3,17 @@ FROM python:3.10.11
3
  # Set the working directory in the container
4
  WORKDIR /code
5
 
6
- # Install ODBC drivers and development files
7
  RUN apt-get update && apt-get install -y \
8
  unixodbc \
9
  unixodbc-dev \
10
  libsqlite3-dev \
11
  build-essential \
 
 
 
 
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
  # Copy the current directory contents into the container at /code
@@ -17,6 +22,5 @@ COPY . .
17
  # Install Python packages
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
-
21
  # Run app.py when the container launches
22
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
3
  # Set the working directory in the container
4
  WORKDIR /code
5
 
6
+ # Install ODBC drivers and development files, including the Microsoft SQL Server ODBC driver
7
  RUN apt-get update && apt-get install -y \
8
  unixodbc \
9
  unixodbc-dev \
10
  libsqlite3-dev \
11
  build-essential \
12
+ curl \
13
+ && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
14
+ && curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list \
15
+ && apt-get update \
16
+ && ACCEPT_EULA=Y apt-get install -y msodbcsql17 \
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
  # Copy the current directory contents into the container at /code
 
22
  # Install Python packages
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
 
25
  # Run app.py when the container launches
26
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]