copy-docker/copy-docker.sh

7 lines
217 B
Bash
Raw Normal View History

2023-06-22 01:30:59 +02:00
#!/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'