Building and packaging applications and IaC
The applications in this solution are all container-enabled, as we saw in the previous chapter. So, in this chapter, we will go through the steps of building and pushing the container images to Amazon Elastic Container Registry (ECR) using the included docker-compose.yml
file.
Notice that the docker-compose.yml
file remains the same, which means that building the applications with containers allows for flexibility and ease of deployment into numerous destinations.
First, let’s create the repositories that are needed in ECR.
Creating ECR repositories
By default, an ECR registry is available when you create an account in AWS, but you are responsible for creating the repositories for each of your images in it.
We can do this easily with the following AWS CLI commands:
aws ecr create-repository --repository-name packt-store-cart aws ecr create-repository --repository-name packt-store-catalog aws ecr create-repository...