# Exercise 3/4: containerize the agent as an HTTP service.
# `adk deploy cloud_run` can build/deploy for you; this Dockerfile is the manual
# path (and works for any container host) so you can see what's happening.
FROM python:3.11-slim

WORKDIR /app

# Install dependencies first (better layer caching).
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the agent code (agent packages, etc.).
COPY . .

# Cloud Run (and most hosts) provide the port via $PORT.
ENV PORT=8080

# Serve the agents in this directory over HTTP. `adk api_server` exposes the
# ADK REST API (and you can point clients/UI at it). The agents dir is ".".
CMD ["sh", "-c", "adk api_server --host 0.0.0.0 --port ${PORT} ."]
