FROM python:3.12-slim WORKDIR /app # Install .NET 8 SDK dependencies RUN apt-get update && apt-get install -y \ wget \ libicu-dev \ && rm -rf /var/lib/apt/lists/* # Install .NET 8 SDK using the official script RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \ && chmod +x dotnet-install.sh \ && ./dotnet-install.sh --channel 8.0 --install-dir /usr/share/dotnet \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ && rm dotnet-install.sh # Copy requirements and install COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the code COPY . . EXPOSE 8000 CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]