I log into the CGC using my eRA Commons ID. How can I push containers to the CGC image registry?

Posted in Add your tools by Zoidberg Wed Mar 02 2016 22:02:39 GMT+0000 (Coordinated Universal Time)·3·Viewed 54,855 times

I use my eRA Commons ID to log into the CGC. How do I use the Docker CLI to log in and push images to the CGC image registry? What do I need?
Mar 2, 2016

To push images to the CGC registry, you first need to login into your CGC account via the CLI:

docker login cgc-images.sbgenomics.com

You will be prompted to enter your CGC username. For password, use your authentication token (available in Account settings > Developer on the CGC).

When pushing your image to the CGC registry, you must prefix the image repository name with "cgc-images.sbgenomics.com/". You can do so when committing the container to an image:

docker commit <CONTAINER_ID> cgc-images.sbgenomics.com/<IMAGE>

Alternatively, you can retag an existing local image by associating the image ID with a new image name:

docker tag <IMAGE_ID> cgc-images.sbgenomics.com/<IMAGE>

When pushing, use the full image name with the CGC URL prefix:

docker push cgc-images.sbgenomics.com/<IMAGE>

Mar 12, 2016

Do I also need to include my cgc user name in the image name? is this case sensitive?

Mar 13, 2016

To log into the CGC using the Docker CLI, always use your exact, case-sensitive username as you made it on the CGC.

However, when naming your images to push to the CGC image registry, you must comply to Docker requirements. This means slightly modifying your image names, as Docker has requirements that repo names only lowercase letters and underscores.

For example, my username on the CGC is "gauravCGC". However, Docker doesn't allow capital letters in a repo name. Therefore, I will log into the CGC using my case-sensitive username (gauravCGC) but name my images as gauravcgc/image_name:tag, where I've replaced upper case letter with lower case.

If your username has other characters (such as .,+,@) replace them with underscores in your Docker image names. For example:
gaurav+CGC --> gaurav_cgc/image:tag
gaurav.kaushik --> gaurav_kaushik/image:tag
[email protected] --> gauravcgc_gmail_com

Markdown is allowed