Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command to list repositories in a remote registry #470

Closed
Tracked by #459
qweeah opened this issue Aug 3, 2022 · 8 comments · Fixed by #525
Closed
Tracked by #459

Command to list repositories in a remote registry #470

qweeah opened this issue Aug 3, 2022 · 8 comments · Fixed by #525
Assignees
Milestone

Comments

@qweeah
Copy link
Contributor

qweeah commented Aug 3, 2022

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

@junczhu
Copy link
Contributor

junczhu commented Aug 9, 2022

I am interest in this, please assign this issue to me

@sajayantony
Copy link
Contributor

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.

@FeynmanZhou
Copy link
Member

FeynmanZhou commented Aug 23, 2022

@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?

@junczhu
Copy link
Contributor

junczhu commented Aug 26, 2022

@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?

provided an alias -l for list in the latest #525

@junczhu
Copy link
Contributor

junczhu commented Aug 26, 2022

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.

LINK

/cc @sajayantony @shizhMSFT @qweeah

@qweeah
Copy link
Contributor Author

qweeah commented Aug 26, 2022

@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.

@shizhMSFT
Copy link
Contributor

shizhMSFT commented Aug 26, 2022

@junczhuMSFT Instead, you may think about last and n according to the Docker Registry V2 API. Related functionalities are also supported by oras-go.

Repository owner moved this from Todo to Done in ORAS-Planning Sep 5, 2022
@junczhu
Copy link
Contributor

junczhu commented Sep 6, 2022

For your information, here is the output sample of this command:

image

/cc @FeynmanZhou

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants