From e90058a04fa5244f576cc47d5d8894609c07064a Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Thu, 22 Jun 2023 01:30:59 +0200 Subject: [PATCH] feat(copy-docker): Initial commit --- copy-docker.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 copy-docker.sh diff --git a/copy-docker.sh b/copy-docker.sh new file mode 100644 index 0000000..cda355e --- /dev/null +++ b/copy-docker.sh @@ -0,0 +1,6 @@ +#!/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'