gcrane-help
Display gcrane command-line help information
TLDR
Display help for a subcommand
Display help
SYNOPSIS
gcrane command [ flags ]
PARAMETERS
copy source_image target_image
Copies a container image from a source registry to a target registry. Authentication is handled automatically if configured through gcloud or environment variables.
ls repository
Lists the tags available in the specified container repository.
rm image
Deletes the specified container image from the registry.
--google-json-key path/to/key.json
Specifies the path to a Google Cloud service account key file for authentication. Can also be set via the GOOGLE_APPLICATION_CREDENTIALS environment variable.
--platform os/arch
Specifies the target platform (OS/Architecture) for image operations (e.g., copy, pull). Example: linux/amd64
--insecure
Bypass TLS certificate verification when connecting to the registry. Use with caution, as it can expose your communications to security risks.
DESCRIPTION
gcrane
is a command-line tool designed for interacting with Google Container Registry (GCR) and other OCI-compatible registries.
It provides functionalities similar to docker
and crane
, but with a focus on simplicity and minimal dependencies. gcrane
allows users to easily copy, list, delete, and authenticate with container images stored in GCR, offering a streamlined experience for managing container images in a cloud-native environment.
It leverages go-containerregistry library for interacting with container registries.
Designed for server-side usage where docker daemon is not available.
CAVEATS
Authentication often relies on having gcloud
configured or setting the GOOGLE_APPLICATION_CREDENTIALS
environment variable. Deleting images can be a destructive operation, so verify the image name carefully before deleting.
AUTHENTICATION
Authentication with Google Container Registry can be handled via several methods: 1) Using a Google Cloud service account key via the --google-json-key
flag or the GOOGLE_APPLICATION_CREDENTIALS
environment variable. 2) Relying on gcloud auth
configuration. gcrane
attempts to automatically discover your gcloud configuration. Proper authentication is crucial for accessing and manipulating images within your repositories.
HISTORY
gcrane
emerged as a lightweight alternative to tools like docker
and crane
, particularly useful in environments where a full Docker daemon is not desirable or feasible.
It addresses the need for a focused tool to manage images within Google Container Registry and other OCI-compatible registries, streamlining tasks related to image copying, listing, and deletion.