From feecf6affd0b88220193e69eae241ed99d53675e Mon Sep 17 00:00:00 2001 From: j4n Date: Tue, 17 Feb 2026 14:19:34 +0100 Subject: [PATCH] docker: add build.sh to set GIT_HASH for local builds Simple wrapper as .git is excluded from build context. --- docker/build.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 docker/build.sh diff --git a/docker/build.sh b/docker/build.sh new file mode 100755 index 00000000..85369368 --- /dev/null +++ b/docker/build.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# Build the chatmail Docker image with the current git hash baked in. +# Usage: ./docker/build.sh [extra docker-compose build args...] +# +# .git/ is excluded from the build context (.dockerignore) so the hash +# must be passed as a build arg from the host. + +export GIT_HASH=$(git rev-parse --short HEAD) +exec docker compose build "$@"