crane-config
Configure crane, an OCI registry client
TLDR
Get the configuration of an image
Display help
SYNOPSIS
crane-config [OPTIONS] <command> [arguments]
PARAMETERS
--config-file <path>
Specifies an alternate configuration file to use instead of the default locations.
--global
Operates on the global configuration, typically located in a system-wide directory (e.g., /etc/crane/config).
--user
Operates on the user-specific configuration, typically located in the user's home directory (e.g., ~/.config/crane/config).
--json
Outputs configuration settings in JSON format, useful for scripting and programmatic access.
get <key>
Retrieves and displays the value of a specific configuration key.
set <key> <value>
Sets a configuration key to a specified value. If the key does not exist, it may be created.
list
Lists all currently configured settings and their values.
edit
Opens the active configuration file in a text editor (e.g., EDITOR or VI environment variable dependent) for manual editing.
reset
Resets the configuration (or specific parts) to its default values, potentially deleting custom settings.
DESCRIPTION
The `crane` command-line tool is a powerful utility for interacting with container registries and images, often used for tasks like copying, deleting, or inspecting images without requiring a full Docker daemon.
It is important to note that the command 'crane-config' is NOT a standard, officially distributed command as part of the `crane` tool or common Linux distributions. This analysis describes a hypothetical command, envisioned to manage the `crane` tool's own operational configuration (e.g., default registry, authentication settings, proxy configuration, default image formats, etc.). If it existed, it would provide a persistent way to configure `crane`'s behavior across sessions, analogous to how other CLI tools manage their settings via configuration files.
CAVEATS
The command 'crane-config' is NOT a standard, officially distributed command that ships with the `crane` tool or as part of common Linux distributions. This analysis describes a hypothetical command based on typical patterns for managing CLI tool configurations.
The `crane` tool itself primarily relies on environment variables (e.g., CRANE_AUTH, CRANE_INSECURE) and specific command-line flags for its configuration and authentication. Do not confuse this hypothetical `crane-config` command with the existing `crane config` subcommand, which is used to inspect or update the configuration blob of a container image, not the `crane` tool's own operational settings.
TYPICAL CONFIGURATION APPROACH FOR `CRANE`
Since a dedicated 'crane-config' command for the tool's operational settings does not exist, users typically configure `crane` via:
1. Environment Variables: For authentication (e.g., `DOCKER_CONFIG` pointing to a directory with `config.json`), insecure registries (`CRANE_INSECURE_REGISTRIES`), or custom CA certificates.
2. Command-line Flags: Many operations accept flags like `--insecure` or `--auth` for one-time configuration.
3. `docker/config.json`: `crane` respects the `~/.docker/config.json` file for registry authentication, similar to Docker CLI.
Users often create shell aliases or wrapper scripts to set common environment variables or flags for persistent `crane` configurations.
HISTORY
The `crane` tool originated from Google's `go-containerregistry` project, designed for efficient interaction with OCI image registries. Its development philosophy emphasizes simplicity and direct operations, often relying on environment variables and direct command-line arguments for dynamic configuration rather than a dedicated persistent configuration manager subcommand like 'crane-config'. Therefore, a 'crane-config' command specifically for managing the tool's own configuration has not been a primary part of its official design.