<#1123 Fix: Published API image omits the default ...
# osctrl
g
#1123 Fix: Published API image omits the default osquery schema file Pull request opened by javuto Fixes #1121 Published API image omits the default osquery schema file Problem The osctrl-api Docker image ships without the osquery schema file referenced by its defaults (./data/5.24.0.json, resolved from pkg/config/flags.go). On startup the API logs a file-not-found warning and serves an empty schema catalog, so MCP table discovery returns zero tables. Root cause: GoReleaser stages only the binary into each image's build context (ids:), so deploy/osquery/data/ never reaches the Docker build. Change • deploy/cicd/docker/Dockerfile-osctrl-api: copy the bundled deploy/osquery/data/ into /opt/osctrl/data/ (all versions, so an osquery version bump in pkg/version doesn't require a Dockerfile change). • .goreleaser.yml: add extra_files: [deploy/osquery/data] to the osctrl-api dockers_v2 entry so the files are staged into the build context. Only osctrl-api reads the schema (osquery.LoadTables in cmd/api/main.go); TLS/CLI images are unchanged. Validation • goreleaser check passes. • Built the image from a simulated GoReleaser-staged context: /opt/osctrl/data/5.24.0.json present. • Ran the API with the default path: startup loads the schema without warnings; GET /api/v1/osquery/tables returns 292 tables (previously []). Impact Operational: fixes default schema discovery and MCP table listing in published API images; image grows by the bundled schema files (~8 MB). jmpsec/osctrl