LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

crane-index-filter

Filter platforms from a container image manifest index

TLDR

Filter an index to keep only linux/amd64
$ crane index filter [image] --platform linux/amd64
copy
Filter to multiple platforms and tag the result
$ crane index filter [image] --platform linux/amd64 --platform linux/arm64 -t [registry/image:tag]
copy
Filter with verbose output
$ crane index filter [image] --platform [linux/amd64] -v
copy
Filter allowing insecure registries
$ crane index filter [image] --platform [linux/arm64] --insecure -t [registry/image:filtered]
copy

SYNOPSIS

crane index filter [options] image

DESCRIPTION

crane index filter modifies a remote multi-platform image index by removing platforms that do not match the specified --platform flags. The result is a new index containing only the selected architectures and OS combinations.This is useful for reducing the size of a multi-architecture image index, creating platform-specific distributions, or removing unwanted platforms before pushing to a registry.The --platform flag uses the format os/arch[/variant][:osversion], such as `linux/amd64`, `linux/arm64`, or `linux/arm/v7`.

PARAMETERS

--platform platform

Platform(s) to keep in the form os/arch[/variant][:osversion]. Can be specified multiple times.
-t, --tag tag
Tag to apply to the resulting filtered image.
--insecure
Allow image references to be fetched without TLS.
--allow-nondistributable-artifacts
Allow pushing non-distributable (foreign) layers.
-v, --verbose
Enable debug logs.
-h, --help
Show help for the filter command.

SEE ALSO

Copied to clipboard
Kai