balena-supervisor/retry_docker_push.sh
2015-10-13 13:45:04 -03:00

16 lines
170 B
Bash
Executable File

#!/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