crane-version
Display the Crane CLI version
TLDR
Display version
Display help
SYNOPSIS
crane version [flags]
PARAMETERS
--json
Output the version information in a machine-readable JSON format. This is particularly useful for programmatic parsing of crane's version details in scripts.
-h, --help
Display a help message for the version subcommand, providing information on its usage and available flags.
DESCRIPTION
crane is a powerful, open-source command-line tool developed by GoogleContainerTools for direct interaction with container registries (like Docker Hub, Google Container Registry, Azure Container Registry, etc.). Unlike docker or podman, crane operates daemon-less, making it ideal for scripting, CI/CD pipelines, and environments where a full container runtime isn't desired or available. It facilitates various operations such as copying images between registries, inspecting manifests, deleting tags, and more, all without requiring a local Docker daemon. The crane version command is a specific subcommand of the crane utility. Its sole purpose is to retrieve and display detailed build and release version information of the crane tool itself. This typically includes the application version number, Git commit hash, build timestamp, and the Go programming language version used to compile it. This information is crucial for debugging, ensuring compatibility, or simply verifying the installed tool's iteration.
CAVEATS
The crane version command is a subcommand and relies on the crane executable being installed and accessible in the system's PATH. It only reports the version of the crane binary itself and does not involve any network interaction with container registries for its operation. The exact details provided (e.g., build date, Go version) depend on how the crane binary was compiled.
OUTPUT FORMAT
By default, crane version outputs human-readable text, typically structured as 'Version: vX.Y.Z', 'GitCommit:
HISTORY
The crane tool emerged from GoogleContainerTools as an open-source project to address the need for lightweight, direct interaction with OCI-compliant container registries, bypassing the need for a full Docker daemon. Its development focused on providing robust functionalities for image manipulation and inspection. The version subcommand has been a fundamental part of crane since its early iterations, adhering to the common practice in command-line tools to provide easy access to their build metadata. This subcommand's consistent presence underscores its importance for users to quickly ascertain the tool's identity and build specifics, facilitating debugging and compatibility checks within continuous integration and deployment workflows.