oras
oras copied to clipboard
Command to list repositories in a remote registry
The proposed command is:
Usage:
oras repository list REGISTRY [flags]
Flags:
--ca-file string server certificate authority file for the remote registry
-d, --debug debug mode
-h, --help help for list
--insecure allow connections to SSL registry without certs
-p, --password string registry password or identity token
--password-stdin read password or identity token from stdin
--plain-http allow insecure connections to registry without SSL check
-u, --username string registry username
-v, --verbose verbose output
The output should be a list of repositories with one name per line.
Related to #459
I am interest in this, please assign this issue to me
Since other targets don't have repositories maybe cranes approach of calling it catalog makes more sense to me since it also matches with the API. Also are there any other commands under the repository group? If there are then repository list
makes sense.
@sajayantony
Since other targets don't have repositories maybe cranes approach of calling it catalog makes more sense to me since it also matches with the API
I see repository
is more common than catalog
on the registry side like DockerHub, ACR, ECR, etc. so I vote for naming repository
here.
Also are there any other commands under the repository group?
There will be another command list-tags
under the repository
group.
@qweeah @junczhuMSFT Let me give a detailed example for this CLI UX:
$ oras repository list samplecr.cncf.io
acr/hello-world
library/alpine
net-monitor
sample/hello-world
Shall we provide an alias -l
for list
in this command?
@sajayantony
Since other targets don't have repositories maybe cranes approach of calling it catalog makes more sense to me since it also matches with the API
I see
repository
is more common thancatalog
on the registry side like DockerHub, ACR, ECR, etc. so I vote for namingrepository
here.Also are there any other commands under the repository group?
There will be another command
list-tags
under therepository
group.@qweeah @junczhuMSFT Let me give a detailed example for this CLI UX:
$ oras repository list samplecr.cncf.io acr/hello-world library/alpine net-monitor sample/hello-world
Shall we provide an alias
-l
forlist
in this command?
provided an alias -l for list in the latest #525
Shall we provide "first" and "skip" flags? @FeynmanZhou There is an azure cli feature, for example, users can skip the first 3,000 records and return the first 1,000 records after those records skipped.
/cc @sajayantony @shizhMSFT @qweeah
@junczhuMSFT IF --first
and --skip
are provided, will oras fetch the skipped records?
e.g. oras repository list some.oci.distro --first 100 --skip 300
, at least 400 records will be fetched right?
If so, I don't think they need to be added to oras, user can use oras to fetch all the repositories and use tail
and head
to chop out the records needed.
@junczhuMSFT Instead, you may think about last
and n
according to the Docker Registry V2 API. Related functionalities are also supported by oras-go
.
For your information, here is the output sample of this command:
/cc @FeynmanZhou