#!/bin/bash # Assume 'root@' unless specified artifact="${1}" target="${2}" [[ ! "${target}" == *'@'* ]] && target='root@'"${target}" docker save "${artifact}" | pv | ssh -o ConnectTimeout=3 "${target}" 'docker load'