Downloads fail from time to time because Gradle does not retry certain
types of network failures
(https://github.com/gradle/gradle/issues/8264).
Retrying twice should reduce the flake rate below noticeable without
increasing the size of the interop image created for each new release
for historical testing.
Fixes#18892
Ideally instead of having names like ruby_jessie_x64_ruby_2_5 and
ruby_jessie_x64_ruby_2_6 they would have the name "ruby" with tags
containing jessie_x64_ruby_2_5/6. But fixing that would be much more
invasive. The sha1 in the tag is producing the worst effects, so this is
a case of the perfect being the enemy of the good.
Fixes#20546
If [[ "$DONE" != 1 ]] && echo "Failed to do composer install" && exit 1
is at the end of a shell script, even if DONE is 1, this will return with error
exit status. That's because [[ $DONE != 1 ]] has exitcode 1 and thus anything after && doesn't get executed
and the entire scripts exits the last exit code it seen (which is 1).
With rake-compiler-dock-1.0.1 there's no need to use a derived Dockerfile.
The standard RCD image can be used instead.
The only issue is with conflicting declarations of gettimeofday(), which can be easily worked around by patching win32.h before the build.
Fixes#21514