A swiss army knife for CI and container checks. Single binary, zero dependencies.
Stop copying brittle shell scripts and installing a variety of tools for container validation. Preflight is a small, dependency-free binary that handles service readiness, health checks, environment validation, file verification, and more.
COPY --from=ghcr.io/vertti/preflight:latest /preflight /usr/local/bin/preflight
RUN preflight cmd myapp --min 2.0
RUN preflight env MODEL_PATH --match '^/models/'
RUN preflight file /app/config.yaml --not-empty
RUN preflight tcp postgres:5432Use it for:
- Docker builds – verify binaries, configs, and paths during image build
- Container startup – wait for databases and services before your app starts
- CI pipelines – validate environments, check connectivity, verify checksums
- Health checks – HTTP and TCP checks without curl or netcat
Clear output, CI-friendly exit codes:
Every check tells you exactly what passed or failed—no more guessing why your build broke.
[OK] cmd: node
path: /usr/local/bin/node
version: 20.10.0
[OK] file: /app/config.yaml
size: 1.2KB
mode: -rw-r--r--
[FAIL] cmd: python
version 3.9.0 < minimum 3.11
[FAIL] tcp: postgres:5432
connection refused
Exit code 0 on success, 1 on failure. Works with set -e, Docker RUN, and CI pipelines out of the box.
Dockerfiles (recommended):
COPY --from=ghcr.io/vertti/preflight:latest /preflight /usr/local/bin/preflightWant to keep your final image lean? See Keeping Containers Clean for multi-stage builds and external validation.
Shell:
curl -fsSL https://raw.githubusercontent.com/vertti/preflight/main/install.sh | shSee the full usage guide for all commands and options.
Like which, but actually runs the binary to verify it works.
preflight cmd node # exists and runs
preflight cmd node --min 18.0 # version constraint
preflight cmd ffmpeg --version-cmd -version # custom version flagpreflight env DATABASE_URL # exists and non-empty
preflight env MODEL_PATH --match '^/models/' # matches pattern
preflight env APP_ENV --one-of dev,staging,prod # allowed valuespreflight file /models/bert.onnx --not-empty # file exists and has content
preflight file /var/log/app --dir --writable # directory is writable
preflight file /app/entrypoint.sh --executable # script is executableHealth checks for services without requiring curl or wget in your container.
preflight http http://localhost:8080/health # basic health check
preflight http https://api.example.com --status 204 # custom status code
preflight http http://localhost/ready --retry 3 # retry on failureSupply chain security - verify downloaded binaries match expected hashes.
preflight hash --sha256 67574ee...2cf myfile.tar.gz # verify SHA256
preflight hash --checksum-file SHASUMS256.txt app.tar.gz # from checksum fileCreate a .preflight file in your project to define all checks in one place:
# .preflight
file /etc/localtime --not-empty
cmd myapp --min 2.0
cmd go
env HOMERun all checks:
preflight run # finds .preflight automatically
preflight run --file /path/to/.preflight # specify file explicitlyFile format, discovery, and hashbang support
Apache 2.0
