A command-line interface for pruning container images in bulk from a container image distribution registry
Install: See the Install section below
Usage: See doc/usage.md
Warning
Please be aware of this known issue.
The image-prune CLI is built on the same foundational library as skopeo, and thus is impacted by this issue as well. Please use this tool at your own risk.
For more demos, see doc/usage.md
For each release of image-prune, we publish pre-compiled builds of the image-prune CLI.
For convenience, you may use our install script to download and install the latest pre-compiled image-prune CLI.
Usage:
<sh | bash> install.sh <version> [os] [arch]
Example:
sh install.sh v1.0.0-alpha.2 linux amd64
This assumes
- You are running on a unix-like system supporting
shorbash - The
/usr/local/binsubdirectory exists, and is on yourPATH - You have
curlandjqinstalled - You have a GitHub personal access token which expires no more than one year from now
- (Optional) You have
goinstalled, in which case you may omit the[os]and[arch]optional positional args above
Each of our releases contain pre-compiled binaries which you may install manually if the install script is not suitable for your use case
If you have go installed, you may also install the CLI using
GOBIN="/usr/local/bin" go install github.com/IBM/image-prune@v1.0.0-alpha.2
Note
This will build the image-prune CLI from source on your machine, and may lead to unexpected results when using the image-prune version subcommand.
Clone this repository on the tag corresponding to the version you would like to install. The latest is v1.0.0-alpha.2. Run
YOUR_OS="<your-os>"
YOUR_ARCH="<your-arch>"
make build PLATFORMS="$YOUR_OS/$YOUR_ARCH"
mv ./dist/image-prune-${YOUR_OS}-${YOUR_ARCH} /usr/local/bin/image-prune