2020-09-24 13:08:36 +00:00
|
|
|
n=0
|
|
|
|
while :
|
|
|
|
do
|
|
|
|
docker pull $2 \
|
|
|
|
&& docker tag $2 $1$2 \
|
|
|
|
&& docker push $1$2 && break # substitute your command here
|
|
|
|
n=$((n+1))
|
2020-09-24 13:57:50 +00:00
|
|
|
if [ $n -ge 10 ]; then
|
|
|
|
echo "initialise failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-09-24 13:08:36 +00:00
|
|
|
echo "retrying..$n"
|
2020-09-24 13:57:50 +00:00
|
|
|
sleep 5
|
2020-09-24 13:08:36 +00:00
|
|
|
done
|
|
|
|
|