# Use an official lightweight Python image FROM python:3.9-slim # Set the working directory inside the container WORKDIR /app # Install required dependencies RUN pip install --no-cache-dir fastapi uvicorn # Copy all project files into the container COPY . /app # Expose the application port EXPOSE 8000 # Command to run the application using Uvicorn server CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]