LinuxCommandLibrary

gcrane

Copy container images to/from registries

TLDR

Login to a registry

$ gcrane auth login [registry] [[-u|--username]] [user] [[-p|--password]] [password]
copy

List tags, manifests, and sub-repostiories
$ gcrane ls [registry]/[project_id]
copy

Copy images from one registry to another
$ gcrane cp [[-r|--recursive]] [source_registry]/[project_id]/[repository] [target_registry]/[project_id]/[repository]
copy

Print images that can be garbage collected
$ gcrane gc [registry]/[project_id]/[repository]
copy

Delete images that can be garbage collected
$ gcrane gc [registry]/[project_id]/[repository] | xargs [[-n|--max-args]] 1 gcrane delete
copy

List a specific registry with specific ID
$ gcrane ls [gcr.io]/[my-project-id]
copy

Migrate all images from US registry to EU registry
$ gcrane cp [[-r|--recursive]] [gcr.io]/[my-project-id]/[repository] [eu.gcr.io]/[my-project-id]/[repository]
copy

SYNOPSIS

gcrane [OPTIONS] [ARGS] (non-standard; no canonical syntax)

DESCRIPTION

The gcrane command is not a standard utility found in common Linux distributions such as Ubuntu, Fedora, or Debian repositories, nor is it part of core GNU tools or busybox. Searches across man pages, command-not-found handlers, and package managers yield no results for gcrane.

It may refer to a custom script, third-party tool, or alias related to Google Container Registry (GCR), where similar functionality exists in tools like crane (a lightweight CLI for OCI container images compatible with GCR) or gcloud container commands from the Google Cloud SDK.

Crane, often used with GCR, allows pulling, pushing, and inspecting container images without a daemon. Install via go install or binaries from GitHub (imjasonh/crane). Example: crane pull gcr.io/project/image:tag.

If intending GCR operations, use gcloud artifacts (successor to GCR) or docker with authentication. Verify locally with which gcrane or man gcrane; absence confirms non-standard status. Custom implementations might exist in specific environments like CI/CD pipelines or proprietary setups.

CAVEATS

Absence from standard paths (/usr/bin, /bin) indicates it's unavailable by default. Potential confusion with crane or gcloud. Requires installation if third-party.

ALTERNATIVES FOR GCR

Use gcloud artifacts docker for Google Artifact Registry (GCR migration target) or crane for portable image management.
Example: crane auth login gcr.io.

HISTORY

No documented history; likely not upstreamed to major distros. Crane project originated ~2020 by Jason Hall for simple registry ops, gaining traction post-Docker daemon alternatives.

SEE ALSO

crane(1), gcloud(1), docker(1), skopeo(1)

Copied to clipboard