Otherwise prepare-base is likely to fail when first run (but then succeed when rerun, because the container is left running), because the container isn't up yet when we try to operate in it. Also clean up the placement of `set -e` vs `set -x`.