balena-supervisor/retry_docker_push.sh

16 lines
170 B
Bash
Raw Normal View History

#!/bin/bash
IMAGE=$1
retries=0
while [ "$retries" -lt 3 ]; do
let retries=retries+1
docker push $IMAGE
ret=$?
if [ "$ret" -eq 0 ]; then
break
fi
done
exit $ret