singularityhub / sregistry-cli

Singularity Global Client for container management
https://singularityhub.github.io/sregistry-cli/
Mozilla Public License 2.0
14 stars 18 forks source link

updating organization of containers, and adding different versions #215

Closed vsoch closed 5 years ago

vsoch commented 5 years ago

This pull request will close #214 , specifically when the user adds a "same" container (different file / version) the filename is added to the database organized by container collection, name, and then tag and version.

Here we see images 3 and 4, both just added (different files so different versions)

$ sregistry images
Containers:   [date]   [client] [uri]
1  June 04, 2019       [hub]    my-library/my-image:latest@407e58c8295f495498df03cbf479f0de
2  June 04, 2019       [hub]    my-library/my-image:latest@7a7522e617d3e010a00c10d4016d4a0e
3  June 04, 2019       [google-compute] vanessa/busybox:latest@2c656dfd4b70157d326170821a10fa9e
4  June 04, 2019       [google-compute] vanessa/busybox:latest@38d45ecf29e428fc40a27ad48fba6367

Here is how they are kept in storage, cleaner / clearer than before:

$ ls /home/vanessa/.singularity/shub/vanessa/busybox/
latest@2c656dfd4b70157d326170821a10fa9e.sif  latest@38d45ecf29e428fc40a27ad48fba6367.sif

And when we do a get, we return the first result:

$ sregistry get vanessa/busybox
/home/vanessa/.singularity/shub/vanessa/busybox/latest@2c656dfd4b70157d326170821a10fa9e.sif

@tschoonj mentioned not keeping different versions but asking the user to use --force, and I can imagine users (that do want versions) would have issue with that.

Signed-off-by: Vanessa Sochat vsochat@stanford.edu