# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Root build context spans the modules (types/ operator/ backend/).
# Ignore everything by default and re-include only what the image build needs.
**

# Re-include Go source files (but not *_test.go)
!**/*.go
**/*_test.go

# bpf2go embeds the precompiled, architecture-independent eBPF objects from
# generated Go. The C source and toolchain are development-only.
!**/*.o

# Re-include per-module Go module files
!**/go.mod
!**/go.sum

# Re-include embedded assets the build needs (bex-api control-plane migrations,
# the branded-email HTML layout, the instance-tier catalog, the usage price
# sheet, the pinned Render API/Blueprint schemas, the pinned official MCP tool
# list, and the operator's build-toolchain freshness inventory)
!**/*.sql
!**/*.tmpl
!types/tiers/tiers.yaml
!backend/internal/pricing/pricing.yaml
!backend/internal/api/openapi/render-public-api-1.json
!backend/internal/api/openapi/render-mcp-tools.json
!backend/internal/apps/schema/*.json
!backend/internal/agentsession/agent-profiles.json
!operator/internal/build/toolchain-freshness.json

# ADR047's separate agent-template Dockerfile shares this root context so it can
# copy the credential helper/hygiene hooks and pinned production driver package;
# tests and fixtures are not copied into the production image. The driver is
# TypeScript, compiled in its own build stage, so the build context needs the
# .ts sources + tsconfig.json (not dist/, which is a fresh build artifact).
!agent-image/
!agent-image/bex-pre-snapshot
!agent-image/driver/
!agent-image/driver/src/
!agent-image/driver/src/*.ts
!agent-image/driver/tsconfig.json
!agent-image/driver/package.json
!agent-image/driver/package-lock.json

# The CLI (cli/) is a user-installed binary released via the bex-cli/v* tag
# train, not an image entrypoint — keep it out of the build context despite
# the !**/*.go re-includes above.
cli/
