There are many instances where you’ll want to tag your docker image to a certain stable version and use it for your application. This tagging by version would prevent any untested/ breaking changes being deployed directly to the latest release being and causing issues in the apps using them.
Amazon Elastic Container Registry (ECR) is a fully-managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images. Using this managed service definitely provides advantages such as vulnerability scans and high availability for your docker images.
In this post, I’ll describe how to get a docker image and upload it to an ECR library.
What you’ll need: AWS cli v2.0 and an AWS account.
Make sure to log into your AWS account using aws-mfa.
# log into your ECR repository $ aws ecr get-login-password | docker login --username AWS --password-stdin ACCOUNT_ID.dkr.ecr.REGION.amazonaws.com/#REPO_NAME # pull required image to your local machine. For example, we'll pull aws-es- proxy docker image which helps to connect to Elasticsearch $ docker pull abutaha/aws-es-proxy:v1.1 # get ID of the downloaded image with the following command $ docker image ls # tag image using ID obtained in the step above. $ docker tag ImageID:tag ACCOUNT_ID.dkr.ecr.REGION.amazonaws.com/ECR_REPO_NAME:tag # push image to ECR repository used in the step above. $ docker push ACCOUNT_ID.dkr.ecr.REGION.amazonaws.com/ECR_REPO_NAME:tag # Complete, now you can verify via console by logging into AWS console
Wow! In the end I got a weblog from where I be able to really obtain useful data concerning my study and knowledge. Bab Creight Gorrian