Created
December 27, 2016 14:06
-
-
Save Gedrovits/ae74acc52b74167ab22039523194386f to your computer and use it in GitHub Desktop.
Retriable Ruby bundler
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: http://www.zhuwu.me/blog/posts/solve-gem-installation-timeout-when-building-docker-image | |
N=0 | |
STATUS=1 | |
until [ ${N} -ge 5 ] | |
do | |
bundle install --without development test --jobs 4 --deployment && STATUS=0 && break | |
echo 'Try bundle again ...' | |
N=$[${N}+1] | |
sleep 1 | |
done | |
exit ${STATUS} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment