One of the reasons Docker has quickly become attractive to developers and operations teams is that the deployment of Docker images and containers has made CI and CD pipelines for enterprise applications easier.
To automate the deployment of our application, we will create a CI/CD pipeline that deploys the Docker image that contains our application in ACI.
ACI is a managed service from Azure that allows you to deploy containers very easily, without having to worry about the hardware architecture.
In addition, we will use Terraform for Infrastructure as a Code, which we discussed in Chapter 2, Provisioning Cloud Infrastructure with Terraform, using the Azure ACI resource and its integration with the Docker image.
We will, therefore, divide this section into two parts:
- The Terraform code of the Azure ACI and its integration with our Docker image
- An example of a CI/CD pipeline in Azure Pipelines, which allows you to execute the Terraform code
To start, we will write the Terraform code that allows you to provision an ACI resource in Azure.