Files
openapi/Dockerfile.skills
T
2026-08-21 09:42:03 -07:00

18 lines
892 B
Docker

# hanzoai/openapi — the agent-skills artifact.
#
# Regenerates the FULL /.well-known/agent-skills catalog from the OpenAPI SOT
# (skills.py --no-services) ONCE, as a versioned immutable image whose rootfs is
# the catalog at /catalog. hanzoai/cloud then does
# `FROM oci.hanzo.ai/hanzoai/agent-skills:<tag> AS skills` +
# `COPY --from=skills /catalog/` instead of cloning openapi and re-running
# skills.py inside every cloud release — so cloud compiles only Go.
FROM public.ecr.aws/docker/library/python:3.12-alpine AS build
RUN pip install --no-cache-dir pyyaml
WORKDIR /openapi
COPY . .
# Master catalogue only (--no-services): what cloud embeds. FAIL-HARD if the
# master index isn't produced — the image is not built (same as cloud's stage).
RUN python3 skills.py --no-services --out /catalog && test -s /catalog/hanzo/index.json
FROM scratch
COPY --from=build /catalog/ /catalog/