Is there any reason you prefer `set -e` over `&&`? I'm curious if this is a readability thing.
$ bash -ec 'echo hello && ls -la /tmp/ | grep systemd && false && echo testing'
hello
drwx------. 3 root root 60 Mar 29 18:33 systemd-private-bluetooth.service-yuSMVM
drwx------. 3 root root 60 Mar 29 18:33 systemd-private-upower.service-YhHHP2
versus $ bash -euxc 'echo hello; ls -la /tmp/ | grep systemd; false; echo testing'
+ echo hello
hello
+ ls -la /tmp/
+ grep systemd
drwx------. 3 root root 60 Mar 29 18:33 systemd-private-bluetooth.service-yuSMVM
drwx------. 3 root root 60 Mar 29 18:33 systemd-private-upower.service-YhHHP2
+ false
Docker also supports the `SHELL` syntax now, which is even better, because you can set it once at the top of the Dockerfile without having to do the whole `set -eux` on every line.I also have a hard time reasoning about && with anything other than the most braindead sequence of commands because: $(thing && if other_thing; then inner_thing1 && thing2; fi && ohgawd)
And I just realized while typing that out that if its parser doesn't support ; then I guess one needs to
RUN if conditional_thing \
then good_luck && \
fi && \
echo "whew"