Excel_SQL_Processor / Dockerfile
mattn01's picture
Update Dockerfile
9025e89 verified
raw
history blame
966 Bytes
# Use Python as the base image
FROM python:3.10
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
unixodbc \
unixodbc-dev \
apt-transport-https \
gnupg \
libodbc1 \
odbcinst
# Add Microsoft repository and install ODBC Driver 17
RUN curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | tee /etc/apt/trusted.gpg.d/microsoft.asc
RUN echo "deb [arch=amd64] https://packages.microsoft.com/debian/11/prod bookworm main" > /etc/apt/sources.list.d/mssql-release.list
RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql17
# Verify installation
RUN ls -l /usr/lib/x86_64-linux-gnu/ | grep odbc
# Set working directory
WORKDIR /home/user/app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Run the Streamlit app
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]