Closed HaraldNordgren closed 3 months ago
I also really really want this feature.
wow! this feature was not considered in the redesign? very poor!
I strongly agree - it would be very nice if we can get this working!
This is my number 1 hatred of Docker hub and what triggered me to go find an alternative, I'd love to see this implemented!
The issue here is the same as the Kubernetes dashboard sorting issue: the API does not support sorting (in fact it doesn't return anything other than an array of strings!) https://docs.docker.com/registry/spec/api/#listing-image-tags, https://github.com/kwk/docker-registry-frontend/blob/3ad864b388a24d5bef896b08593f8dfb3acf1357/app/services/registry-services.js#L105
The details (such as Created date) are then filled out in https://github.com/kwk/docker-registry-frontend/blob/3ad864b388a24d5bef896b08593f8dfb3acf1357/app/services/registry-services.js#L146
So the sorting must happen after these two bits of code have run before rendering.
Unfortunately I have no idea how to navigate Angular projects! But hopefully someone more vested in Angular/JS can tackle this one!
+1
+1
This is slow, and ugly, and probably highlights some glaring deficiencies in my understanding of bash. But it does work:
docker_images_date() {
docker images | head -n 1
sorted_images=$(echo $(for id in $(docker images -aq) ; do
docker inspect -f "{{.Created}}" $id
echo ,$id
done) | sed 's/ ,/_/g;s/ /\n/g' | sort -r | sed 's/^.*_//')
for image in $sorted_images ; do
docker images | grep $image
done
}
You can put that in your .bashrc
and then do:
docker_images_date | grep myreponame
And (provided you've pulled them) you'll see your images listed in reverse creation order.
You might want to take a look at this release: https://github.com/superevilmegaco/docker-registry-frontend/releases/tag/v3.0.0
The newest release lets you sort by every column: https://github.com/superevilmegaco/docker-registry-frontend/releases/tag/v4.0.0
In the list of images under a repository, I want to be able to sort images based on Creation date or Tag.