Container image
NAME
container - running the immutable image directly
The image is built from the release tag with a distroless base, and its entrypoint is the binary, so arguments pass straight through with no shell in between.
DIRECT RUN
$docker run --rm -v "$PWD:/w" -w /w \ reg.driftpipe.sh/driftpipe:0.9.4 \ check --schema schema.lock --input events.ndjson --sample 0driftpipe 0.9.4 48213 records 31 paths 182msno drift
Mounting the working directory read-write is only needed for snapshot; a check can mount :ro and still read both the stream and the lock. The exit status of the container is the exit status of the tool, so a wrapping script reads it the same way it would a local binary.
IN A PIPELINE STEP
# any runner that can run a containerdriftpipe() { docker run --rm -i -v "$PWD:/w:ro" -w /w reg.driftpipe.sh/driftpipe:0.9.4 "$@"; } zcat dumps/latest.ndjson.gz | driftpipe check --input - --fail-on breaking
The -i flag keeps standard input attached, which is what lets the image read a piped stream through --input - exactly as the bare binary would.
GOTCHAS
- Tags are immutable by release, so
0.9.4is always that build; the movinglatesttag is a choice you will regret on a Friday. - Override the entrypoint only when a job needs a shell around the tool; otherwise the pass-through is simpler and harder to get wrong.
- The image adds nothing the binary lacks. If the runner can install a 6 MB file, the prebuilt binary is one fewer moving part.