mirror of
https://github.com/containers/podman.git
synced 2025-11-29 01:28:22 +08:00
This change adds a .CreatedAt format option to the podman artifact ls command to match the behavior of podman images --format CreatedAt. The .Created field continues to display human-readable elapsed time (e.g., '6 hours ago'), while the new .CreatedAt field displays the full timestamp (e.g., '2025-10-23 12:34:56 +0000 UTC'). Changes: - Refactored artifactListOutput struct to store time.Time value - Added CreatedAt() method returning full timestamp string - Added Created() method for human-readable duration - Updated documentation to include .CreatedAt field - Added e2e test for .CreatedAt format option Generated-with: Cursor AI Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
72 lines
2.3 KiB
Markdown
72 lines
2.3 KiB
Markdown
% podman-artifact-ls 1
|
|
|
|
## NAME
|
|
podman\-artifact\-ls - List OCI artifacts in local store
|
|
|
|
## SYNOPSIS
|
|
**podman artifact ls** [*options*]
|
|
|
|
## DESCRIPTION
|
|
|
|
List all local artifacts in your local store.
|
|
|
|
## OPTIONS
|
|
|
|
#### **--format**
|
|
|
|
Print results with a Go template.
|
|
|
|
| **Placeholder** | **Description** |
|
|
|-----------------|------------------------------------------------|
|
|
| .Created | Elapsed time since the artifact was created |
|
|
| .CreatedAt | Full timestamp of when the artifact was created|
|
|
| .Digest | The computed digest of the artifact's manifest |
|
|
| .Repository | Repository name of the artifact |
|
|
| .Size | Size artifact in human readable units |
|
|
| .Tag | Tag of the artifact name |
|
|
| .VirtualSize | Size of artifact in bytes |
|
|
|
|
@@option no-trunc
|
|
|
|
@@option noheading
|
|
|
|
## EXAMPLES
|
|
|
|
List artifacts in the local store
|
|
```
|
|
$ podman artifact ls
|
|
REPOSITORY TAG DIGEST CREATED SIZE
|
|
quay.io/artifact/foobar1 latest ab609fad386d 6 hours ago 2.097GB
|
|
quay.io/artifact/foobar2 special cd734b558ceb 53 seconds ago 12.58MB
|
|
```
|
|
|
|
List artifacts in the local store without truncating the digest
|
|
```
|
|
$ podman artifact ls --no-trunc
|
|
REPOSITORY TAG DIGEST CREATED SIZE
|
|
quay.io/artifact/foobar1 latest ab609fad386df1433f461b0643d9cf575560baf633809dcc9c190da6cc3a3c29 6 hours ago 2.097GB
|
|
quay.io/artifact/foobar2 special cd734b558ceb8ccc0281ca76530e1dea1eb479407d3163f75fb601bffb6f73d0 53 seconds ago 12.58MB
|
|
```
|
|
|
|
List artifacts in the local store without the title header
|
|
```
|
|
$ podman artifact ls --noheading
|
|
quay.io/artifact/foobar1 latest ab609fad386d 6 hours ago 2.097GB
|
|
quay.io/artifact/foobar2 special cd734b558ceb 53 seconds ago 12.58MB
|
|
```
|
|
|
|
List artifact digests and size using a --format
|
|
```
|
|
$ podman artifact ls --format "{{.Digest}} {{.Size}}"
|
|
ab609fad386d 2.097GB
|
|
cd734b558ceb 12.58MB
|
|
```
|
|
|
|
|
|
|
|
## SEE ALSO
|
|
**[podman(1)](podman.1.md)**, **[podman-artifact(1)](podman-artifact.1.md)**
|
|
|
|
## HISTORY
|
|
Jan 2025, Originally compiled by Brent Baude <bbaude@redhat.com>
|