Created
June 17, 2019 10:49
-
-
Save iwanbolzern/b5ac601f678c6207b9671183f9e7a8e2 to your computer and use it in GitHub Desktop.
Migrate docker repository from hub.docker.com into private registry
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
original_image="iwanbolzern/my-awesome-repo" | |
new_name="iwanbolzern/my-awesome-repo" | |
target_acr="my-private-registry:5000" | |
# Download all images | |
docker pull $original_image --all-tags | |
# retag image and push to new acr | |
docker images $original_image \ | |
--format "docker tag {{.Repository}}:{{.Tag}} $target_acr/$new_name:{{.Tag}} | docker push $target_acr/$new_name:{{.Tag}}" | | |
bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment