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

docker repo - v2/_catalog #1441

Open
Tzahif opened this issue Apr 10, 2024 · 4 comments
Open

docker repo - v2/_catalog #1441

Tzahif opened this issue Apr 10, 2024 · 4 comments

Comments

@Tzahif
Copy link

Tzahif commented Apr 10, 2024

Hi,

i want to get all of the containers and their tags using the v2/_catalog endpoint but i am not able to find how to do it, and if it is supported at all.

i can get the tags of a specific image with this endpoint v2/my-docker-s3/my-minio/tags/list but i would like to get all of the catalog in a specific repo

i would appreciate help with understand how to use the v2/_catalog endpoint.

*** note - i tried to add the repo name to the url in some places but it still didn't work

@dgarus
Copy link
Contributor

dgarus commented Apr 26, 2024

I started the server and executed the following request

HttpClient http = HttpClient.newBuilder()
            .version(HttpClient.Version.HTTP_1_1)
            .build();
URI uri = new URIBuilder()
    .setScheme("http").setHost("localhost").setPort(8080).setPath("v2/_catalog")
    .build();
HttpRequest request = HttpRequest.newBuilder()
    .GET().uri(uri).header("Authorization", "Basic YWxpY2U6MTIz")
    .build();
HttpResponse<String> response = http.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());

and I got the result

[INFO] ForkJoinPool.commonPool-worker-6 com.artipie.docker.http.DockerSlice: << OK
Content-Type: application/json; charset=utf-8
Content-Length: 28
200
{"repositories":["my-test"]}

What did you get?

@Tzahif
Copy link
Author

Tzahif commented Apr 26, 2024

Can you give CURL command example so I understand what I did wrong?

@Tzahif
Copy link
Author

Tzahif commented Apr 30, 2024

@dgarus, screenshots for the issue:
image
image

@Tzahif
Copy link
Author

Tzahif commented May 16, 2024

@dgarus can you please help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants