# EXAMPLE component image. Copy, rename, replace: # ctrl/Dockerfile.api -> image -api -> image: in k8s/base/api.yaml # COPY paths are relative to the REPO ROOT (Tilt context='..'), not this directory. # Notes: docs/notes/Dockerfile.example.md FROM python:3.12-slim WORKDIR /app # Dependencies first, in their own layer, so a source edit does not reinstall them. COPY api/requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt # Repo-root relative — see above. COPY api/ ./api/ # Match this with the containerPort in the manifest and the target of the # Service in front of it. EXPOSE 8000 CMD ["python", "-m", "api"] # live_update: Tiltfile's sync('../api', '/app/api') must match COPY api/ + WORKDIR /app, # or edits silently do nothing.