ubuntu_install_java.sh
239 Bytes
-
Docker build script robustness (#2710) · 1342151e
* [DOCKER] Make all install .sh scripts directly executable. * [DOCKER] Use curl -L consistently. Make the use of the curl -L option in docker build scripts consistent. * [DOCKER] Drop use of --force-yes The --force-yes option is generally not recommend, it can leave systems in an undefined state. The use of --allow-* options is preferred. In this particular case the --force-yes option appears to serve no purpose. Dropping it. * [DOCKER] Drop superflous repeated apt-get update. The "apt-get update && apt-get install" idiom is necessary and specific to Dockerfile. In shell the repeated apt-get update is superflous. Drop the duplicates. * [DOCKER] Robustness -e -u -o pipefail The install scripts used to construct docker environments do not, in general, propagate errors. Some of the scripts use adhoc && directives to chain together short sequences of commands but there are numerous failure modes which are silently ignored. This patch puts in place some consistent, basic, shell error trapping across all of the install scripts. Note this is a step forward towards more robust scripts but it is not a complete solution. * [DOCKER] Shallow clone. Use shallow clone to reduce bandwidth requirements of repeated docker (re)-builds. * [DOCKER] Use clone --branch rather than clone then checkout Use the git clone --branch idiom rather than git clone && git checkout. This paves the way for using --depth=1
Marcus Shawcroft committed