Pushing containers into ECR
In this recipe we will rebuild our API and microservice containers and push them to ECR. We will also push a RabbitMQ container to ECR.
Getting ready
Bear with this, as this can get tricky. In addition to our container images, we also need to push our RabbitMQ container to ECR. ECS doesn't talk to Docker Hub and and can't pull that image. it would be immensely convenient, but at the same time it's probably also a security issue.
Note
Pushing these containers to ECR from a home internet connection can take a long time. I create a Linux image in EC2 in the same region as my ECR, pulled down the code from github, build the containers on that EC2 system, and then push to ECR. The push takes a matter of minutes, if not seconds.
First, let's rebuild our API and microservice containers on our local system. I've included the Python files, two docker files, and a configuration file for the microservice in the 11/05
recipe folder.
Let's start with the build of the API container...