Skip to content

Commit 797eabc

Browse files
AlexKantor87claude
andcommitted
docs: clarify --artifact-type=docker requires registry digest
A customer hit "repo digest unavailable for the image, has it been pushed to or pulled from a registry?" after kosli attest artifact with --artifact-type=docker in CI, where the image was built but never pushed. The constraint that the docker artifact type requires a registry-resident image was only stated in the error itself. Add a note to the long descriptions of attest commands (via fingerprintDesc) and kosli fingerprint, covering the constraint and pointing at oci and dir as alternatives. Help-text only; no behaviour change. Auto-generated docs in kosli-dev/docs will pick this up on the next CLI release. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2023a6e commit 797eabc

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

cmd/kosli/fingerprint.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ images in registries or "docker" for local docker images.
4040
Fingerprinting container images can be done using the local docker daemon or the fingerprint can be fetched
4141
from a remote registry.
4242
43+
Note: ^--artifact-type=docker^ reads the image's repo digest via the local Docker daemon, so
44+
the image must have been pushed to or pulled from a registry. A freshly built image (just
45+
^docker build^) does not have a repo digest. For images already in a registry, prefer
46+
^--artifact-type=oci^ to fetch the digest directly from the registry.
47+
4348
` + fingerprintDirSynopsis
4449

4550
const fingerprintExamples = `

cmd/kosli/root.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,19 @@ const (
4242

4343
// the following constants are used in the docs/help
4444
fingerprintDesc = `
45-
The artifact fingerprint can be provided directly with the ^--fingerprint^ flag, or
45+
The artifact fingerprint can be provided directly with the ^--fingerprint^ flag, or
4646
calculated based on ^--artifact-type^ flag.
4747
4848
Artifact type can be one of: "file" for files, "dir" for directories, "oci" for container
4949
images in registries or "docker" for local docker images.
5050
51+
Note: ^--artifact-type=docker^ reads the image's repo digest via the local Docker daemon.
52+
The image must have been pushed to or pulled from a registry for a repo digest to exist;
53+
a freshly built image (just ^docker build^) will not have one. If the image is already in
54+
a registry, prefer ^--artifact-type=oci^, which fetches the digest directly from the
55+
registry without needing a local Docker daemon. To fingerprint the source instead, use
56+
^--artifact-type=dir^ on the build context.
57+
5158
`
5259

5360
attestationBindingDesc = `

0 commit comments

Comments
 (0)