# Dockerfile # 1. Use an official Python runtime as a parent image FROM python:3.11-slim # 2. Set the working directory inside the container WORKDIR /app # 3. Copy the dependency file and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # 4. Copy the application code into the container # Copy the application and test code COPY app/ ./app/ COPY tests/ ./tests/ # 5. Expose the port the app runs on EXPOSE 8000 # 6. Define the command to run the application # --host 0.0.0.0 makes the server accessible from outside the container CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]