Skip to content

feat(dist): container image, signed releases (SBOM + provenance), go install - #41

Merged
malickyeu merged 2 commits into
mainfrom
feat/distribution-container-signing
Jun 15, 2026
Merged

feat(dist): container image, signed releases (SBOM + provenance), go install#41
malickyeu merged 2 commits into
mainfrom
feat/distribution-container-signing

Conversation

@malickyeu

Copy link
Copy Markdown
Contributor

Summary

Standard distribution/supply-chain tooling for the project — three additions:

  • Container image — a Dockerfile (multi-stage → distroless/static, non-root, embeds the UI, ~30 MB) and a new image job in release.yml that pushes a multi-arch (amd64/arm64) image to ghcr.io/koduj-dev/docker-commander on each v* tag, with buildx provenance + SBOM attestations and a cosign signature.
  • Signed releases + SBOM + provenancerelease.yml now keyless-signs SHA256SUMS with cosign (SHA256SUMS.sig / .pem), generates an SPDX SBOM (dockercmd.sbom.spdx.json), and emits per-binary SLSA build provenance (actions/attest-build-provenance). Fits the project's existing supply-chain story (SHA-256-verified self-update).
  • go install — documented as an install path in the README.

Plus a .dockerignore, README Quick start options (Docker / go install) and a Verifying a download section, and CHANGELOG [Unreleased] entries.

Type of change

  • Bug fix
  • New feature
  • Docs only
  • Refactor / chore

Checklist

  • go test -short ./... and go vet ./... pass
  • gofmt gate is clean (gofmt -l $(git ls-files '*.go') after staging)
  • Frontend type-checks (cd web && npx tsc --noEmit) — N/A (no UI change)
  • Rebuilt and committed web/dist — N/A (nothing under web/src changed)
  • Added/updated tests for the change — N/A (CI/docs/Dockerfile; validated by a real local docker build, see notes)
  • Updated docs/ and added a CHANGELOG.md entry for user-facing changes

Notes for reviewers

  • No Go source changed. The Dockerfile was built and run locally on amd64: the image is 30 MB, runs as non-root, and --version / --help work.
  • The release-time steps (cosign sign-blob, SBOM, attestations, ghcr push + image signing) can't be exercised in a PR — they first run on the next v* tag. YAML validated; action versions are current (cosign-installer@v3, attest-build-provenance@v2, sbom-action@v0, build-push-action@v6, metadata-action@v5).
  • The first ghcr push creates the package under the org; the image job uses GITHUB_TOKEN with packages: write (set per-job). cosign is keyless (Sigstore OIDC) — no secrets to manage.
  • Per-job permissions are scoped (release: contents/id-token/attestations; image: packages/id-token/attestations).

…install

- Dockerfile: multi-stage build to a distroless/static base, non-root, embeds
  the UI, ~30 MB. A new release.yml `image` job pushes a multi-arch
  (amd64/arm64) image to ghcr.io/koduj-dev/docker-commander with provenance +
  SBOM attestations and a cosign signature.
- release.yml: keyless cosign signature over SHA256SUMS (+ .sig/.pem), an SPDX
  SBOM (dockercmd.sbom.spdx.json), and per-binary SLSA build-provenance
  attestations.
- README: Docker and `go install` quick-start options + a "Verifying a
  download" section (sha256sum / cosign verify-blob / gh attestation verify).
- .dockerignore + CHANGELOG [Unreleased] entries.
Copilot AI review requested due to automatic review settings June 15, 2026 14:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds standard distribution and supply-chain outputs for Docker Commander: a published container image, signed release artifacts with SBOM/provenance attestations, and updated installation/verification docs.

Changes:

  • Add a multi-stage Dockerfile producing a distroless, non-root runtime image that embeds the UI.
  • Extend GitHub release workflow to generate an SPDX SBOM, sign SHA256SUMS with keyless cosign, and emit build provenance; add a separate job to build/push/sign a multi-arch GHCR image with SBOM/provenance attestations.
  • Update README/CHANGELOG with Docker + go install quick-start and verification steps; add a .dockerignore.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Adds Docker + go install installation paths and artifact verification commands.
Dockerfile Introduces a multi-stage build producing a distroless/non-root container image.
CHANGELOG.md Documents new distribution options and supply-chain artifacts under Unreleased.
.github/workflows/release.yml Adds SBOM generation, cosign signing, provenance attestations, and a GHCR image publish/sign job.
.dockerignore Reduces Docker build context size by excluding irrelevant directories/files.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread README.md Outdated
sha256sum -c SHA256SUMS --ignore-missing # checksum

cosign verify-blob --certificate SHA256SUMS.pem --signature SHA256SUMS.sig \
--certificate-identity-regexp 'koduj-dev/docker-commander' \
Comment on lines +45 to +47
# cosign verify-blob --certificate SHA256SUMS.pem --signature SHA256SUMS.sig \
# --certificate-identity-regexp 'koduj-dev/docker-commander' \
# --certificate-oidc-issuer https://token.actions.githubusercontent.com SHA256SUMS
Comment on lines +90 to +94
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest

… cosign identity, no latest on pre-releases

- README Docker quick-start binds the UI to 127.0.0.1 by default (drop it to
  expose on the LAN), matching the native default for an admin tool.
- Tighten the cosign verify-blob --certificate-identity-regexp to the exact
  repo + workflow path (anchored), so signatures from similarly named repos
  (docker-commander-*) can't satisfy it. Updated in the README and the
  release.yml comment.
- Drop the explicit `type=raw,value=latest` image tag; rely on
  docker/metadata-action's default latest=auto so only stable semver tags move
  `latest` (a v*-rc pre-release won't).
@malickyeu
malickyeu merged commit 0617101 into main Jun 15, 2026
3 checks passed
@malickyeu
malickyeu deleted the feat/distribution-container-signing branch July 31, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants