How project-zot/zot works
zot is a vendor-neutral OCI image registry: clients push and pull OCI artifacts through the distribution API, while zot authenticates requests, routes repositories to image storage, and maintains registry metadata. Its broader product includes replication, search/CVE scanning, retention, and event/monitoring extensions, plus separate administrative and search clients. The map follows documented and excerpted wiring; storage-driver and metadata-backend details are represented at their implementation boundaries where the excerpts do not establish finer call relationships.
Main entry points: controller.go API controller · routes.go OCI distribution API · imagestore.go Image store · service.go Registry sync
Components 21
Registry serving
- Server startup
pkg/cli/server/root.go - API controller
pkg/api/controller.go - OCI distribution API
pkg/api/routes.go - Authentication
pkg/api/authn.go
Artifact and metadata
- Store setup
pkg/storage/storage.go - Store routing
pkg/storage/storage_controller.go - Image store
pkg/storage/imagestore/imagestore.go - Storage drivers
pkg/storage/common/common.go - Metadata backends
pkg/meta
Registry capabilities
- Registry sync
pkg/extensions/sync/service.go - Search and CVE
pkg/extensions/extension_search.go - Retention
pkg/retention/retention.go - Background scheduler
pkg/scheduler/scheduler.go - Event extensions
pkg/extensions/events
Clients and operations
- Registry CLI
pkg/cli/client - Search CLI
pkg/cli/client/service.go - Metrics exporter
pkg/exporter/api/exporter.go - Benchmark tool
cmd/zb/perf.go
Other components
- Registry client
- Upstream registry
- Cloud object storage
Connections 30
- Registry client → Server startup: configures
pkg/cli/server/root.go - Server startup → API controller: starts
pkg/cli/server/root.go - API controller → Store setup: initializes stores
pkg/api/controller.go - API controller → OCI distribution API: sets up router
pkg/api/controller.go - Registry client → OCI distribution API: sends OCI requests
README.md - OCI distribution API → Authentication: authenticates
pkg/api/routes.go - OCI distribution API → Store routing: routes repository
pkg/api/routes.go - Store setup → Store routing: builds store map
pkg/storage/storage.go - Store setup → Storage drivers: creates drivers
pkg/storage/storage.go - Store routing → Image store: selects image store
pkg/storage/storage_controller.go - OCI distribution API → Image store: reads and writes artifacts
pkg/api/routes.go - Image store → Metadata backends: records metadata
- Storage drivers → Cloud object storage: stores artifacts
- API controller → Background scheduler: starts tasks
pkg/api/controller.go - API controller → Event extensions: configures recorder
pkg/api/controller.go - API controller → Registry sync: initializes sync
- Registry sync → Upstream registry: replicates from
pkg/extensions/sync/service.go - Registry sync → Image store: writes synced content
pkg/extensions/sync/service.go - Registry sync → Metadata backends: uses metadata
pkg/extensions/sync/service.go - API controller → Search and CVE: registers extension
pkg/extensions/extension_search.go - Search and CVE → Metadata backends: queries metadata
pkg/extensions/extension_search.go - Search and CVE → Image store: searches images
pkg/extensions/extension_search.go - API controller → Retention: runs retention
- Registry client → Registry CLI: administers registry
pkg/cli/client/client.go - Registry CLI → OCI distribution API: calls registry API
- Registry client → Search CLI: requests image search
pkg/cli/client/service.go - Search CLI → Upstream registry: queries registry
- Registry client → Metrics exporter: scrapes metrics
- Registry client → Benchmark tool: runs benchmark
- Benchmark tool → Upstream registry: benchmarks requests