Docker - Push Docker Images to AWS ECR

2021-08-10

# authenticate with aws ecr
aws ecr get-login-password --region {REGION} |\
  docker login --username AWS \
  --password-stdin {AWSID}.dkr.ecr.{REGION}.amazonaws.com

# tag image (signature)
docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]

# tag image (example)
docker tag api:latest {AWSID}.dkr.ecr.{REGION}.amazonaws.com/api:latest

# push to ecr
docker push {AWSID}.dkr.ecr.{REGION}.amazoneaws.com/api:latest
  • {REGION} : replace with your region
  • {AWSID} : replace AWS account number/id

References

About

Home

Contact Me

mitchell@gritts.me

This Site

Built by me. Writing and images are my original work unless otherwise noted. Please attribute this site when sharing.

This content served from this URL (mitchell.gritts.net) is licensed with the Unlicense. Content served from other URLs may have other licenses. The repo is currently private while I actively build out the site.