crane-catalog
List container image repository contents
TLDR
List the repositories in a registry
Print the full image reference
Display help
SYNOPSIS
crane catalog [flags] registry
PARAMETERS
registry
The container registry to list repositories from (e.g., gcr.io, docker.io/library).
--insecure
Allow insecure (HTTP) connections.
--platform
A comma-separated list of platforms to use when resolving images (e.g., linux/amd64,windows/amd64).
--raw
Print the raw JSON output.
--help
Show help message.
DESCRIPTION
The crane catalog command allows users to discover the repositories available within a container registry. It directly interacts with the registry's API, listing all top-level repositories without requiring local docker daemon access or image pulls. This is useful for inventorying and understanding the available images in a registry. Crane catalog is part of the broader `crane` tool, which focuses on lightweight container image management. It operates efficiently by directly interacting with registries, making it suitable for automated tasks and environments with limited resources.
Unlike `docker search`, which relies on the Docker Hub index, `crane catalog` queries the registry directly, ensuring accuracy and independence from external indexing services. This direct interaction makes it a more reliable method for discovering repositories, especially when dealing with private registries or registries that are not indexed by Docker Hub.
This allows developers and system administrators to understand the available image within registries, as well as automate processes involving container registries.
CAVEATS
The command might not work with older or non-standard registries that do not fully implement the Docker Registry HTTP API V2 specification. It also relies on the registry providing an accurate catalog API endpoint.
EXAMPLES
List repositories in Google Container Registry:crane catalog gcr.io
List repositories in Docker Hub:crane catalog docker.io/library
Get raw JSON output:crane catalog --raw gcr.io
HISTORY
The `crane` tool, and consequently the `crane catalog` command, emerged as a lightweight alternative to the Docker CLI for container image manipulation. It was developed to address performance and resource consumption concerns associated with the full Docker daemon, especially in CI/CD environments. Its development focused on direct interaction with container registries via their HTTP APIs, enabling faster and more efficient image management workflows.
SEE ALSO
crane copy(1), crane digest(1), crane manifest(1), docker search(1)