Created
May 8, 2022 09:26
-
-
Save kyawzaymoore/1a3cede704f66c6b657c79da3bf5c8bb to your computer and use it in GitHub Desktop.
ECR Docker build tag push command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ECR Login | |
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin {{Your_ECR_Url}} | |
# example | |
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 084965179264.dkr.ecr.ap-southeast-1.amazonaws.com | |
# Docker Build | |
docker build -t helloworld:v1 . | |
#example | |
docker build -t {{image_name}}:{{version}} . | |
# Docker tag to hub | |
docker tag helloworld:v1 {{Your_ECR_Url}}/{{image_name}}:{{version}} | |
# example | |
docker tag helloworld:v1 084965179264.dkr.ecr.ap-southeast-1.amazonaws.com/helloworld:v1 | |
# Docker push to hub | |
docker push {Your_ECR_Url}}/{{image_name}}:{{version}} | |
# example | |
docker push 084965179264.dkr.ecr.ap-southeast-1.amazonaws.com/helloworld:v1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment