Created
February 4, 2016 21:41
-
-
Save ghostbar/ded530c54b9e3ff99012 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# vim: ft=sh | |
declare SSH_HOST="${SSH_HOST:-myserver.com}" | |
declare SSH_USER="${SSH_USER:-uploader}" | |
declare SSH_PORT="${SSH_PORT:-22}" | |
declare TAGS="${TAGS:-resnullius/alpine-armv7l:latest resnullius/alpine-armv7l:3.3 resnullius/alpine-armv7l:edge}" | |
for tag in $TAGS | |
do | |
echo uploading $tag | |
declare PUSH_CMD="${PUSH_CMD:-docker push $tag}" | |
docker save $tag | bzip2 | pv | ssh -p $SSH_PORT $SSH_USER@$SSH_HOST 'bunzip2 | docker load' && \ | |
ssh -p $SSH_PORT $SSH_USER@$SSH_HOST $PUSH_CMD | |
echo uploaded $tag | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment