Created
March 4, 2021 16:38
-
-
Save if6was9/6c956fd7101df1d2e77aca5fffe02939 to your computer and use it in GitHub Desktop.
mirror-soluble-repos.sh
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
#!/bin/bash | |
set -e | |
mirror_soluble_image() { | |
IMAGE=$1 | |
TAG=$1 | |
SOURCE_IMAGE=gcr.io/soluble-repo/$1:$2 | |
TARGET_IMAGE=${MIRROR_REPO}/$1:$2 | |
echo | |
echo "mirroring ${SOURCE_IMAGE} ==> ${TARGET_IMAGE}" | |
docker pull ${SOURCE_IMAGE} | |
docker tag ${SOURCE_IMAGE} ${TARGET_IMAGE} | |
docker push ${TARGET_IMAGE} | |
} | |
MIRROR_REPO=$1 | |
if [ "${MIRROR_REPO}" = "" ]; then | |
echo "usage: $0 <repo>" | |
echo | |
echo "example: $0 gcr.io/example" | |
echo | |
exit 1 | |
fi | |
mirror_soluble_image soluble-tools stable | |
mirror_soluble_image zodiac stable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment