That way, the docker command can push and pull images with Amazon ECR. Docker images are usually stored on Docker Hub, but AWS’s Elastic Container Registry can also be used. You can push your image to Amazon ECR in any section of your yml. You can apply up to 100 tags per image in Amazon ECR. Pushing a Docker image to Amazon ECR.

Typically, you would want to push your image at the end of the ci section, or in the post_ci or push sections.

Before you start, you will need to connect your Amazon account with Shippable so we have the credentials to push your image on your behalf.

Setup. It’s a great solution and this post teaches you how to push Docker images to AWS’ Elastic Container Registry (ECR). Now let’s pull an image from Docker Hub which we will push to ECR Repo or build your self from your Dockerfile. The final command pushes the docker image up to AWS ECR. Copy the second command if you want to build your own image or go to the third command and execute it . Here I will pull apache/httpd image and then push it. To authenticate Docker to an Amazon ECR registry with get-login-password, run the aws ecr get-login-password command. docker pull httpd List the Images to see the available images on the local system. docker images.

docker tag … This is what the third command achieves. Before pushing an image to a repository, you must tag it with the URL of the repository. The AWS CLI provides a get-login-password command to simplify the authentication process.

By default, our Docker image was tagged as “ecr-demo:latest” and this command adds a tag with the URL to our repository. docker push aws_account_id.dkr.ecr.region.amazonaws.com/my-web-app (Optional) Apply any additional tags to your image and push those tags to Amazon ECR by repeating Step 4 and Step 5.