Skip to content

Commit 346ca39

Browse files
AlexKantor87claude
andauthored
docs: clarify --artifact-type=docker requires registry digest (#834)
* 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> * docs: drop dir suggestion from artifact-type=docker note Source-dir fingerprinting only works as an end-to-end identity if the runtime side also fingerprints the source dir. Standard Kosli runtime reporters fingerprint the running image, so suggesting dir as a generic swap is misleading — the attested and running artifacts would never link. Push and oci are the safe answers for the typical case. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6e52319 commit 346ca39

3 files changed

Lines changed: 19 additions & 2 deletions

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: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,18 @@ 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.
56+
5157
`
5258

5359
attestationBindingDesc = `

‎cmd/kosli/testdata/output/docs/mintlify/artifact.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@ artifact {IMAGE-NAME | FILE-PATH | DIR-PATH} [flags]
1616

1717
Report an artifact creation to a Kosli flow.
1818

19-
The artifact fingerprint can be provided directly with the `--fingerprint` flag, or
19+
The artifact fingerprint can be provided directly with the `--fingerprint` flag, or
2020
calculated based on `--artifact-type` flag.
2121

2222
Artifact type can be one of: "file" for files, "dir" for directories, "oci" for container
2323
images in registries or "docker" for local docker images.
2424

25+
Note: `--artifact-type=docker` reads the image's repo digest via the local Docker daemon.
26+
The image must have been pushed to or pulled from a registry for a repo digest to exist;
27+
a freshly built image (just `docker build`) will not have one. If the image is already in
28+
a registry, prefer `--artifact-type=oci`, which fetches the digest directly from the
29+
registry without needing a local Docker daemon.
30+
2531

2632

2733
## Flags

0 commit comments

Comments
 (0)