HUB
Sign inSign up

fklement/errata

By fklement

•Updated 11 days ago

Checks the claims a repository makes about itself against its files, live systems and next apply.

Image
Integration & delivery
Developer tools
1

2.7K

fklement/errata repository overview

⁠errata

license release docker hub docker pulls Ko-fi

Like errata or find it useful? Offer me a coffee. All features are free either way.

errata checks the claims a repository makes about itself, such as a port in a README against the port in the config, and prints each claim it finds false with the reason the check was written. The README⁠ says what it does and why, and the handbook⁠ teaches it from the first check on. This page covers the image.

⁠Run it

Mount the repository and make it the working directory:

docker run --rm -v "$PWD:/repo" -w /repo fklement/errata check

It reads errata.yaml from the repository root. A minimal one:

checks:
  - id: readme-names-the-current-port
    reason: The service moved to port 8443. A README that still says 8080 sends people to nothing.
    scope: repo
    run: [bash, -c, '! grep -n "8080" README.md']

This check is a program: it exits 0 when its claim is true and 1 when it is false, and anything else is unknown, which fails the run. A check can also be a rule that reads values out of files, or a generated check.

docker run --rm fklement/errata --help prints every command, flag and exit code, as docs/cli.md⁠ does. docs/reference.md⁠ has every key of errata.yaml, and the handbook's CI section⁠ has the jobs for GitLab CI and GitHub Actions that run this image.

⁠What is in the image

  • errata, a static Go binary, on PATH.
  • Alpine Linux with bash 5.3, so a check can be a bash or POSIX shell script using grep, sed, awk and find.
  • It runs as root, so a CI job can write its report into the workspace. Pass --user to docker run to run it as yourself.

A check that needs another program needs an image that has it:

FROM fklement/errata:latest
RUN apk add --no-cache git python3 jq

⁠How it is built

A release builds the image with ko⁠ from the kos: section of .goreleaser.yaml⁠, from the public source at its tag: errata as a static binary on top of bash:5.3-alpine3.24, pinned by digest, for linux/amd64 and linux/arm64. The GitHub release⁠ carries an SPDX SBOM for each binary.

The Dockerfile⁠ builds the same image with docker build -t errata .: the same base images, binary path, user and entrypoint. CI builds it on every change and refuses a base image that differs from the release's.

⁠Tags

TagMeaning
latestthe newest release
X.Y.Zone release
X.Y.Z-rc.Na release candidate, for trying a release before it ships; latest never points at one

A version tag never changes after it is pushed, so pin one rather than latest to choose when you upgrade. CI cuts and publishes a patch release on its own when a HIGH or CRITICAL vulnerability with a fix turns up in the last release's image.

⁠License

MIT, see LICENSE⁠.

Tag summary
Recent tags
Content type
Image
Digest
sha256:be2151b67…
Size
17.4 MB
Last updated
11 days ago
docker pull fklement/errata:latest