Skip to content

strata index

strata index

Crawl a registry and build or update the index

Synopsis

Crawl repos, tags, manifests and image configs, then recompute lineage, staleness and today's snapshot. The crawl is resumable: if it stops, the next run skips the repos it already finished. Re-crawls only list tags and compare digests, and every tag move is recorded in tag history from the first crawl on.

Registries come from --registry or from the registries list in the config file. Filter flags given without --registry replace those filters on every configured registry for this run.

Filters skip work before it is requested: --include-repo and --exclude-repo before a repo's tags are listed, --include-tag and --exclude-tag before a tag is resolved, and --platforms before a platform's manifest is read. Repos and tags a filter skips are left as the index last saw them.

Registries with their own API are listed through it: ECR (with the AWS credential chain), Artifact Registry (-docker.pkg.dev, with Google application default credentials, given --project), ACR (.azurecr.io) and Harbor (--provider harbor). That needs no request per tag, records push times (and pull times on ECR and Harbor), and allows --pushed-since.

strata index [flags]

Examples

  strata index --registry reg.io --workers 64
  strata index --registry localhost:5000 --insecure --repo payments/api
  strata index --registry reg.io --include-repo 'team-*/**' --exclude-tag 'pr-*' --platforms linux/amd64
  strata index --registry 123456789012.dkr.ecr.us-east-1.amazonaws.com --pushed-since 90d
  strata index --registry us-docker.pkg.dev --project acme-prod
  strata index --registry harbor.example.com --provider harbor
  strata index --external docker.io/library/debian:bookworm-slim

Options

      --exclude-repo strings   skip repos matching this glob (repeatable)
      --exclude-tag strings    skip tags matching this glob, such as pr-* (repeatable)
      --external strings       external base refs to fetch so roots resolve (repeatable)
      --fetch-bases            fetch, by digest, bases provenance names that are not indexed, from any registry (default true)
  -h, --help                   help for index
      --include-repo strings   crawl only repos matching this glob (repeatable; ** crosses path segments)
      --include-tag strings    crawl only tags matching this glob (repeatable)
      --insecure               allow plain HTTP
  -o, --output string          output format: text or json (default "text")
      --platforms strings      keep only these platforms of multi-platform images, such as linux/amd64 (repeatable)
      --project strings        Google Cloud projects to list Artifact Registry repositories in (repeatable)
      --provenance             read BuildKit provenance, which names the base each image was built from (default true)
      --provider string        how to list the registry: auto, ecr, harbor, gar, acr or distribution (default "auto")
      --pushed-since string    skip images pushed longer ago than this, such as 90d (registry APIs only)
      --rate float             request limit per second (0 means unlimited)
      --referrers              fetch SBOMs, signatures and attestations (default true)
      --registry string        registry host to crawl, such as reg.io (overrides the config's registries)
      --repo strings           crawl only these repos (repeatable); default is the registry catalog
      --workers int            concurrent requests (default 16)

Options inherited from parent commands

      --config string      config file (default: $XDG_CONFIG_HOME/strata/strata.yaml, ~/.strata.yaml or ./strata.yaml)
      --db string          index file (default: $XDG_DATA_HOME/strata/strata.duckdb)
      --log-level string   log level: debug, info, warn or error (default: info)
      --platform string    platform to pick when a ref names a multi-platform index (default: linux/amd64)
      --server string      URL of a running strata serve to query instead of the index file

SEE ALSO

  • strata - Turn a container registry into a queryable lineage graph