mirror of
https://github.com/chatmail/relay.git
synced 2026-05-14 18:04:38 +00:00
docker: add build.sh to set GIT_HASH for local builds
Simple wrapper as .git is excluded from build context.
This commit is contained in:
9
docker/build.sh
Executable file
9
docker/build.sh
Executable file
@@ -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 "$@"
|
||||||
Reference in New Issue
Block a user