fix(docker): enforce bash shell to support pipefail across distros
Some checks failed
Mark stable commit / test-unit (push) Has been cancelled
Mark stable commit / test-integration (push) Has been cancelled
Mark stable commit / test-env-virtual (push) Has been cancelled
Mark stable commit / test-env-nix (push) Has been cancelled
Mark stable commit / test-e2e (push) Has been cancelled
Mark stable commit / test-virgin-user (push) Has been cancelled
Mark stable commit / test-virgin-root (push) Has been cancelled
Mark stable commit / mark-stable (push) Has been cancelled

Use bash as the default shell in Docker build stages to ensure
`set -euo pipefail` works reliably on all base images, including
Ubuntu where /bin/sh does not support pipefail.

https://chatgpt.com/share/693c29d9-9b28-800f-a549-5661c783d968
This commit is contained in:
Kevin Veen-Birkenbach
2025-12-12 16:50:32 +01:00
parent 340c1700dc
commit 67bd358e12

View File

@@ -12,6 +12,7 @@ ARG BASE_IMAGE
# - no entrypoint # - no entrypoint
# ============================================================ # ============================================================
FROM ${BASE_IMAGE} AS virgin FROM ${BASE_IMAGE} AS virgin
SHELL ["/bin/bash", "-lc"]
RUN echo "BASE_IMAGE=${BASE_IMAGE}" && cat /etc/os-release || true RUN echo "BASE_IMAGE=${BASE_IMAGE}" && cat /etc/os-release || true