Container release runbook¶
Use this when verifying or troubleshooting Docker image publication.
Preconditions¶
- The repository package visibility allows publishing to GitHub Container Registry.
- The Docker workflow's release publication job has
packages: writepermission. - A reviewed GitHub Release is ready to publish for a tag starting with
v, such asv1.1.0.
Normal release flow¶
- Follow the release runbook through preparation and review of the draft GitHub Release.
- Publish the reviewed GitHub Release. Pushing its tag or saving the release as a draft does not publish a container.
- Watch the
Dockerworkflow triggered by the release'spublishedevent. -
Confirm the workflow:
- lints
Dockerfileand.devcontainer/Dockerfile; - builds and runs the test image;
- builds and smoke-tests the runtime image;
- scans both images with Trivy and fails on critical vulnerabilities;
- publishes the runtime image to GHCR only after those checks pass;
- emits Buildx SBOM and provenance attestations for the runtime image.
- lints
-
Open the GHCR package page and confirm these runtime image tags exist:
ghcr.io/ryancswallace/benchmatrix:vX.Y.Z;ghcr.io/ryancswallace/benchmatrix:latest;ghcr.io/ryancswallace/benchmatrix:sha-<commit>.
-
Verify the runtime image from GHCR:
docker run --rm ghcr.io/ryancswallace/benchmatrix:vX.Y.Z --versionThe command should print
benchmatrix X.Y.Z. Running the image with no arguments should display the command help. The internal test stage is not published.
Adjusting vulnerability policy¶
The Docker workflow currently fails on CRITICAL vulnerabilities and ignores
unfixed findings. To ratchet the policy, update the Trivy steps in
.github/workflows/docker.yml:
- change
severity: CRITICALtoseverity: HIGH,CRITICALto fail on high and critical vulnerabilities; - change
ignore-unfixed: truetoignore-unfixed: falseto include unfixed findings.
After changing the policy, run the Docker workflow on a pull request and confirm that findings are actionable before making the check required.
Failure handling¶
- Dockerfile lint failure: run
make docker-lint, fix the Dockerfile, and rerun. - Build failure: rebuild the devcontainer if needed, then run
make docker-checklocally when Docker is available. - Runtime smoke failure: inspect the image command and package installation layer.
- Critical vulnerability: run
make docker-scanlocally to reproduce, then update the base image or affected dependency. If no fix is available, document the risk before temporarily relaxing the policy. - Publish failure: confirm GHCR package permissions, the publication job's
packages: writepermission, and that the GitHub Release uses av*tag.