Skip to content

Instantly share code, notes, and snippets.

@philipz
Last active November 14, 2017 22:57
Show Gist options
  • Save philipz/67892bdc8a385ecb3b8c to your computer and use it in GitHub Desktop.
Save philipz/67892bdc8a385ecb3b8c to your computer and use it in GitHub Desktop.
Rsync & Docker save

Rsync & Docker save

docker save $1 > $1.tar && rsync -ravP -e ssh $1.tar philipz@192.168.2.51:/home/philipz/tmp && rm $1.tar ##Add Gzip docker save busybox | gzip -c - > busybox.tar.gz

gzip -d busybox.tar.gz && docker load < busybox.tar

docker save busybox | gzip | pv | ssh -i ~/.ssh/id_rsa USER@HOSTNAME sudo docker load

SSH & Docker Load/Save

docker save $IMAGE_REPOSITORY:$1 | bzip2 | pv | ssh $REMOTE_USERNAME@$REMOTE_HOST 'bunzip2 | docker load'

Deploying Docker images via SSH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment