Artifactory is a highly versatile and effective tool that serves as an ideal Docker registry for managing and storing Docker images. With its support for multiple Docker repositories, advanced search functions, and comprehensive access control, Artifactory offers a range of features to simplify Docker registry management. Additionally, Artifactory supports Docker Content Trust, which enables users to sign and verify Docker images to ensure their authenticity and integrity. The tool also integrates seamlessly with popular development tools like Jenkins, Kubernetes, and Helm, making it an excellent solution for containerized application development and deployment. By utilizing Artifactory as a Docker registry, managing Docker images can be streamlined, resulting in improved efficiency and security in the development pipeline.
Docker registry can be used to push our artifacts.You need a CI/CD tool to push your artifacts, files, images, etc, to the Artifactory. In this tutorial, we will see how to create a Docker registry from Artifactory and push our artifacts into it using Harness CI. Harness is a leader in software continuous delivery and has a robust CI module.
- Free Harness account to push our artifacts
- Free JFrog Artifactory account
- A sample application. Fork this sample Node.js application
Select the repo we are working on. Hope you have forked our sample Node.js application repo.
If you click on that step 'Build Node App', you will see the settings configured for you. You can see what's happening there:) Basically, the npm packages required for the application are getting installed, then the build and test is happening.
Let's get to our Artifactory connector setup and add the API key as a secret.
We successfully added the Artifactory connector.
Let's go back to the Artifactory step and add other details such as target and source path. Just for this example, we are going to push our package.json file contents to our newly created Docker registry from Artifactory. We have mentioned the same in the source path.
Congratulations! We successfully created a Docker registry from Artifactory and pushed our artifacts (package.json in this case) with the help of Harness.
This way, developers can easily build and push any artifacts by creating their own Docker registry with Artifactory and Harness.
I have also written a tutorial on setting up a CI/CD pipeline from scratch.
Take a look