Using the shellcheck utility we can ensure shell scripts are well-formed, consistent, and without silent failures.
shellcheck can be run via Docker.
Note: shellcheck is used by hadolint to scan the shell statements inside Dockerfiles. hadolint is currently under consideration as a distinct Dockerfile linting check in #1374