cli
cli copied to clipboard
Add `docker manifest ls` command
- What I did
When you want to push or delete a manifest list, you need to know the name of the manifest list you have created. So I implemented a new sub-command docker manifest ls
:
$ docker manifest ls --help
Usage: docker manifest ls [OPTIONS]
List local manifest lists
EXPERIMENTAL:
docker manifest ls is an experimental feature.
Experimental features provide early access to product functionality. These
features may change between releases without warning, or can be removed from a
future release. Learn more about experimental features in our documentation:
https://docs.docker.com/go/experimental/
Aliases:
docker manifest ls, docker manifest list
Options:
--format string Format output using a custom template:
'table': Print output in table format with column headers (default)
'table TEMPLATE': Print output in table format using the given Go template
'json': Print in JSON format
'TEMPLATE': Print output using the given Go template.
Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
-q, --quiet Only show manifest list NAMEs
- How I did it
More detail, see the issue #4746 that I opened.
- How to verify it The command output like this:
REPOSITORY TAG
example.com/library/test-busybox v1
example.com/library/test-busybox v2
- Description for the changelog
Add sub-command docker manifest ls
- A picture of a cute animal (not mandatory but encouraged)
Codecov Report
Merging #4751 (0fd35ea) into master (4b06a93) will increase coverage by
0.04%
. The diff coverage is66.66%
.
:exclamation: Current head 0fd35ea differs from pull request most recent head b039c0e. Consider uploading reports for the commit b039c0e to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #4751 +/- ##
==========================================
+ Coverage 59.62% 59.66% +0.04%
==========================================
Files 287 289 +2
Lines 24777 24871 +94
==========================================
+ Hits 14774 14840 +66
- Misses 9117 9141 +24
- Partials 886 890 +4
About the replacement of special characters, I make a mistake. On Docker Hub or other registry like Harbor, the image repo name does not allow repeat special characters (-
and _
), but naming images locally allows the use of repeat special characters, possibly due to historical reasons. So the method I used for special character replacement was not good enough. I think it is safer to replace /
with #
and :
with %
, and I have fixed this now.
BTW, platforms information is useful, and I print it now, the output:
REPOSITORY TAG PLATFORMS
example.com/first 1 linux/amd64, linux/arm64
example.com/second 2 linux/amd64