imglife check
Synopsis
Section titled “Synopsis”imglife check [flags]Designed for applicative CI pipelines. Verifies that the base image used in a build is the latest available version and not approaching end-of-life. Can block the CI job with --strict if the base is outdated or at EOL.
| Flag | Required | Description |
|---|---|---|
--base string | yes | Fully-qualified base image tag to check (e.g. registry.example.com/bases/alpine:3.21.3-core1.0.0) |
--config-url string | no | URL to fetch the base-images imglife.yaml (overrides auto-derive) |
--eol-data-url string | no | URL to fetch the EOL data file (overrides auto-derive) |
--strict | no | Exit non-zero if base is outdated or EOL |
--warn | no | Print warnings but always exit 0 |
--output string | no | Output format: text (default) or json |
Examples
Section titled “Examples”# Check a base image (informational, never fails)imglife check --base registry.example.com/bases/alpine:3.21.3-core1.0.0
# Strict mode: fail if base is outdated or at EOLimglife check \ --base registry.example.com/bases/alpine:3.21.3-core1.0.0 \ --strict
# JSON output for programmatic parsingimglife check \ --base registry.example.com/bases/alpine:3.21.3-core1.0.0 \ --output json
# With explicit config and EOL data URLsimglife check \ --base "$BASE_IMAGE" \ --config-url "https://gitlab.example.com/.../imglife.yaml/raw" \ --eol-data-url "https://gitlab.example.com/.../eol-data.yaml/raw"How it works
Section titled “How it works”- imglife resolves the
imglife.yamlof the base-images project (from the Package Registry or--config-url). - It finds the entry in
build.imagesmatching the checked image name. - It compares the current tag with the latest available tag.
- It queries the EOL data (from the Package Registry or
--eol-data-url) to check the lifecycle status. - Reports the result.
JSON output
Section titled “JSON output”{ "base": "registry.example.com/bases/alpine:3.21.3-core1.0.0", "latest": "registry.example.com/bases/alpine:3.21.3-core1.2.0", "up_to_date": false, "eol_date": "2026-11-01", "eol_status": "ok", "warnings": ["base image is outdated: latest is 3.21.3-core1.2.0"]}In applicative CI (GitLab example)
Section titled “In applicative CI (GitLab example)”check: stage: validate image: registry.gitlab.com/imglife-project/imglife:latest variables: IMGLIFE_CONFIG: imglife.apps.yaml script: - | imglife check \ --base "$BASE_IMAGE" \ --strict \ --output textWhere imglife.apps.yaml contains only the registry: section pointing to the base-images Package Registry:
registry: url: https://gitlab.example.com project_id: 42 # base-images project IDGraceful degradation
Section titled “Graceful degradation”If the Package Registry is unavailable, imglife check logs a warning and exits 0 (unless --strict is set). This prevents EOL data outages from blocking all applicative builds.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Base image is OK (or --warn is set) |
1 | Base is outdated or at/past EOL (only with --strict) |
2 | Configuration or network error |