In this recipe, we will configure docker to be able to push our containers to the Elastic Container Repository (ECR).
Configuring Docker to authenticate with ECR
Getting ready
A key element of Docker is docker container repositories. We have previously used Docker Hub to pull containers. But we can also push our containers to Docker Hub, or any Docker-compatible container repository, such as ECR. But this is not without its troubles. The docker CLI does not naturally know how to authenticate with ECR, so we have to jump through a few hoops to get it to work.
Make sure that the AWS command line tools are installed. These are required to get Docker authenticated to work with ECR. Good instructions are found at https:...