Skip to content

Instantly share code, notes, and snippets.

@tlrobinson
Created November 15, 2018 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tlrobinson/1bbb809b514c3580ffd48f47166f29bb to your computer and use it in GitHub Desktop.
Save tlrobinson/1bbb809b514c3580ffd48f47166f29bb to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -eu
MACHINE=$1
IMAGE=$2
MONITOR=$(command -v pv || echo cat)
docker save $IMAGE | bzip2 | $MONITOR | docker-machine ssh $MACHINE 'bunzip2 | docker load'
#!/usr/bin/env bash
set -eu
HOST=$1
IMAGE=$2
MONITOR=$(command -v pv || echo cat)
docker save $IMAGE | bzip2 | $MONITOR | ssh $HOST 'bunzip2 | docker load'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment