feat(images): add OCI source metadata - #1190
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The Gateway release workflow omits DSTACK_SRC_URL in build args, causing the Docker build stage to clone from a hardcoded default source URL and breaking deterministic source selection on non-github.com server URLs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR adds standardized OCI image metadata (source, revision, version, docs, license, base image) to the KMS, Gateway, and Verifier container images, ensuring the same values are available both as image labels/manifest annotations and inside the image filesystem for runtime inspection.
Changes:
- Add OCI labels and
/etc/<image>/build-infofiles to the KMS, Gateway, and Verifier Dockerfiles. - Plumb deterministic
IMAGE_VERSIONandIMAGE_SOURCE_URLbuild args through the shared local build helper. - Enhance release workflows to validate tag namespaces and publish OCI manifest annotations matching the in-image metadata.
File summaries
| File | Description |
|---|---|
| dstack/verifier/builder/Dockerfile | Adds OCI labels and writes /etc/dstack-verifier/build-info. |
| dstack/kms/dstack-app/builder/Dockerfile | Adds OCI labels and writes /etc/dstack-kms/build-info. |
| dstack/gateway/dstack-app/builder/Dockerfile | Adds OCI labels and writes /etc/dstack-gateway/build-info. |
| dstack/build/shared/build-lib.sh | Passes IMAGE_VERSION / IMAGE_SOURCE_URL into local builds as build args. |
| .github/workflows/verifier-release.yml | Validates tag prefix; passes metadata build args; publishes manifest annotations. |
| .github/workflows/kms-release.yml | Validates tag prefix; passes metadata build args; publishes manifest annotations. |
| .github/workflows/gateway-release.yml | Validates tag prefix; publishes manifest annotations; (needs one missing build-arg fix). |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
11c15d7 to
c429030
Compare
Summary
/etc/<image-name>/build-infoTesting
git diff --checkbash -nfor the shared and component image build scriptsdocker buildx build --call=checkfor the KMS, Gateway, and Verifier Dockerfiles