I have docker images stored in jFrog artifactory and I need to get the size of those docker images without pulling it. I tried to figure out if there is any direct REST API provided by jFrog but couldn’t find any.
I also tried one solution by doing a curl request to fetch all the docker layers and to sum all the layers. But I’m looking if there is any feasible solution other than the above?
2
Answers
You can try and use
regclient
.It does allow to inspect images without pulling the layers, allowing quick access to the image manifest and configuration.
And the manifest include the size of the image.
Start with the
regctl manifest
command:Or:
It should include the total size:
JFrog provides a get artifact details REST API where you can get the file size of the image with below REST API.
This will give the following output along with the size.