Copy docker image from one AWS ECR repo to another

letthefireflieslive picture letthefireflieslive · Nov 16, 2018 · Viewed 12.1k times · Source

We want to copy a docker image from non-prod to prod ECR account. Is it possible without pulling, retaging and pushing it again.

Answer

Banjo Obayomi picture Banjo Obayomi · Nov 16, 2018

No you have to run these commands

docker login OLD_REPO
docker pull OLD_REPO/IMAGE:TAG
docker tag OLD_REPO/IMAGE:TAG NEW_REPO/IMAGE:TAG
docker login NEW_REPO
docker push NEW_REPO/IMAGE:TAG