We have significantly updated the Shippable platform with several new features. Hence most of the content in this blog is deprecated. For the latest information, refer to our documentation and/or open a support issue, if you have questions.
We are super excited to announce support for Quay.io integration on the Shippable platform! Many of you requested this and we agree, it's a great service. Quay.io offers a wonderful user experience with detailed information about your images. And, of course, Shippable provides you multiple options to tag images generated via Shippable CI/CD, making it easy to trace those images from the registry back through all activities that occurred to build and validate them. While we were at it, we also added support to integrate any private registry on Shippable.
This post will walk you through how to integrate your Shippable Account with Quay.io and push and pull images through Quay.io.
The process is mostly identical for any private registry as well. If you are familiar with using Docker Hub on Shippable, this should be a breeze!
Step 1: Set up an Account Integration for your Quay.io account or private registry
1. Click on Account Settings in the top navigation bar and select the Integrations tab
2. To add a new integration, click on the "+" at the top right
3. Master Integration: On the dropdown, choose Quay.io. For a private registry, you would choose Private Docker Registry
4. Integration Name: Use a distinctive name that's easy to associate to the integration and recall. I created a Quay.io account called shippabledemo and my Integration Name is QuayShippableDemo.
5. Enter your credentials for Quay.io and hit Save. For a private registry, the URL quay.io needs to be replaced with your private registry URL.
The integration will now be available to all your projects. Your integrations settings should look like the screenshot below:
For this exercise, I forked a sample nodejs project from the ShippableSamples repo. Feel free to do the same and follow along.
Step 2: Set up your Project Settings to pull from or push to Quay.io
1. Go to your Project page and click on the Settings tab
2. Set the Project Hub integration to be your Quay Account Integration Name from Step 1. By specifying the particular registry integration to use here, Shippable allows you to share organizational credentials across multiple team members, as well as enable you to flexibly choose which image registry to use for each project.
Now you are ready to push or pull images from Quay.io. Let's first try and pull an image from Quay.io.
Pull Image from Quay.io:
In my Quay.io repository, I created a Sample Node.js image using a Node.js Dockerfile from ShippableImages. This is the image we will use as a base image to build our project and demonstrate how to pull an image from Quay.io. Under your Project Settings, set the option below:
Pull image name: quay.io/quay_username/quay_repo
Don't forget to hit Save!
When you run the project, you should see your build console connecting to Quay and pulling the Quay image.
You have successfully managed to pull an image from Quay.io!
Push Image to Quay.io:
Now let's try and push an image to Quay.io. I created an empty repo on Quay.io called sample_nodejs where I will push the image after I build this project. Let's stick with the same base image as before, so we are pulling an image from a Quay repo and pushing to another Quay repo.
To do this, go back to your Project Settings and set the following additional options:
Push Build: Yes
Push image to: quay.io/quay_username/quay_repo
Push image tag: Choose a tag from the dropdown. Default is the branch and build number
Your Project Settings should look like below. Note the Project Integrations is also set to my Quay integration called 'QuayShippableDemo by lekhab'.
And that's it. When your build finishes, you will see your image now available in your Quay.io repo.
My Quay.io repo shows the image that I just pushed with the branch and build number as the tag.
Note: If you are using a Private Registry, replace quay.io with the private registry URL and that should be all you need to get this working for a private registry.
Check out our Docker Registry docs for other options as well.