Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyawzaymoore/1a3cede704f66c6b657c79da3bf5c8bb to your computer and use it in GitHub Desktop.
Save kyawzaymoore/1a3cede704f66c6b657c79da3bf5c8bb to your computer and use it in GitHub Desktop.
ECR Docker build tag push command
$ 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