using github's container registry

336 views
Skip to first unread message

Cosmos Nicolaou

unread,
Nov 20, 2020, 1:50:37 PM11/20/20
to singularity
Hi,

can singularity pull docker images hosted on github's docker container registry?

Cheers, Cos.

Thomas Hartmann

unread,
Nov 23, 2020, 3:42:52 AM11/23/20
to singu...@lbl.gov
Hi Cos,

in principle, Singularity should support all repositories, that
understand the Docker API

singularity pull
docker://some.repo.somewhere:443/USERNAME/container:latest

If you need authorization, you will probably export your crdentials before
export SINGULARITY_DOCKER_USERNAME="yourname"
export SINGULARITY_DOCKER_PASSWORD="yourpassword"

Cheers,
Thomas
> --
> You received this message because you are subscribed to the Google
> Groups "singularity" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to singularity...@lbl.gov
> <mailto:singularity...@lbl.gov>.
> To view this discussion on the web visit
> https://groups.google.com/a/lbl.gov/d/msgid/singularity/68d0c720-0d38-4aca-bc74-7b771d49b298n%40lbl.gov
> <https://groups.google.com/a/lbl.gov/d/msgid/singularity/68d0c720-0d38-4aca-bc74-7b771d49b298n%40lbl.gov?utm_medium=email&utm_source=footer>.

Cosmos Nicolaou

unread,
Dec 1, 2020, 8:06:03 PM12/1/20
to singu...@lbl.gov
Hi Thomas,

Thanks for the note, I can confirm that this works as you describe, at least for publicly available images.
The URIs look like: ghcr.io/<you-or-your-org>/container

Cheers, Cos.


You received this message because you are subscribed to a topic in the Google Groups "singularity" group.
To unsubscribe from this topic, visit https://groups.google.com/a/lbl.gov/d/topic/singularity/oQKOx7PkIvY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/03265e82-a1ef-0f30-3230-1ba9a29e4321%40desy.de.

vanessa

unread,
Aug 20, 2021, 1:37:53 PM8/20/21
to singularity, cosmos....@gmail.com
Hey everyone!

I'm going through old threads, and I just want to follow up here - it is definitely possible to push/pull Singularity SIF from the GitHub package registry (and not just Docker images with docker://). Yes, this means push and pull of SIF and no intermediate Docker layers needed. This works by way of the oras:// endpoint! It's very exciting, yes, and I did a brief walk-through of how that looks in this tweet:


And I also prepared a full set of templates that you can use and modify to your needs that will build and deploy the container!


Note that there is currently an issue under discussion about authentication and pulling - currently, if you have added your remote credentials for GitHub and try to pull a publicly pullable container that doesn't require them, it is likely to issue an error. Some (like myself) think that the pull should always be attempted first without adding credentials (akin to the typical API flow of trying a request and then getting a 401 "Unauthorized" to ask for a token) because it's logical you might add credentials for a small set of private / special images, and still want pull to work for any other public image. However, the current implementation is based on what other tools do, so it's a toss up. The discussion is here if you are interested: https://github.com/sylabs/singularity/issues/212.

So you shouldn't need any special Singularity registries anymore if you use this approach. Hooray! :D

Best,

Vanessa

Kandes, Martin

unread,
Aug 23, 2021, 10:32:01 AM8/23/21
to singularity, cosmos....@gmail.com
Vanessa,

Thanks for the example CI templates. I can vouch for GHCR too. I've recently started using it as well. So far so good.

Marty

From: vanessa <vso...@gmail.com>
Sent: Friday, August 20, 2021 10:37 AM
To: singularity <singu...@lbl.gov>
Cc: cosmos....@gmail.com <cosmos....@gmail.com>
Subject: Re: [Singularity] using github's container registry
 
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/2203540c-df43-4023-a0a9-daff74eae4bfn%40lbl.gov.

v

unread,
Aug 23, 2021, 10:33:01 AM8/23/21
to singu...@lbl.gov, cosmos....@gmail.com
Reply all
Reply to author
Forward
0 new messages