Integrating Docker Hub with the CI/CD pipeline
In this section, we will set up a CI pipeline for building containerized applications. We will build and publish Docker images to Docker Hub:
Figure 11.21 – Scenario: Build and push a Docker image to Docker Hub using Azure DevOps pipelines
We will start by adding a service connection to the Azure DevOps project and follow the same steps presented in the previous section.
In Service connections, add a new service connection to link Azure DevOps with the Docker Hub account. Select Docker Registry, and in Registry type, check Docker Hub. Complete the different settings, select Verify and Save:
Figure 11.22 – Link Azure DevOps with Docker Hub Registry
We will follow the same steps as previously to create a build pipeline. Follow these steps:
- To proceed with configuring your pipeline, select your repository and in the Configure tab, select Docker- Build a Docker...