# Use Python 3.10-slim as a base FROM python:3.10-slim ENV PYTHONUNBUFFERED=1 # Install system dependencies for MS SQL ODBC (comment out if not using MSSQL) # Install system dependencies for MS SQL ODBC and command-line tools RUN apt-get update && apt-get install -y curl gnupg apt-transport-https \ && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \ && curl https://packages.microsoft.com/config/debian/11/prod.list \ | tee /etc/apt/sources.list.d/mssql-release.list \ && apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql18 mssql-tools18 unixodbc-dev \ && echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc \ && apt-get clean && rm -rf /var/lib/apt/lists/* RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \ && apt-get install -y nodejs \ && npm install -g yarn # Set the working directory WORKDIR /app # Copy requirements and install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the Django project (app/ folder) into the container COPY app/ /app/ # Expose Django's default port EXPOSE 8000 # Default command: run Django's development server CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]