List images in the archive file
The hangar archive ls
command supports listing the images in the archive file.
Quick Start
Use following command to list images in archive file created by save command:
#!/bin/bash
hangar archive ls --file="save_example.zip"
The output information is like:
hangar archive ls -f save_example.zip
[18:56:27] [INFO] Created time: 2025-02-13
[18:56:27] [INFO] Index version: v1.2.0
[18:56:27] [INFO] Images:
1 | docker.io/cnrancher/hangar:v1.9.0-beta.2 | arm64,amd64 | linux | 227.18M | (with attestation)
2 | docker.io/cnrancher/hangar:latest | amd64,arm64 | linux | 213.27M | (with attestation)
Usage
hangar archive ls --help
Show images (index) in Hangar archive file
Usage:
hangar archive ls [flags]
Examples:
# Show images in archive file:
hangar archive ls -f SAVED_ARCHIVE.zip
Flags:
-f, --file string Path to the Hangar archive file (.zip)
-h, --help help for ls
--image-only Only output image list
--json Output in json format
Global Flags:
--debug enable debug output
--insecure-policy run Hangar without policy check