Files
query-orchestration/scripts/docker.yml
T
Jay Brown a6e081e5cd Merged in feature/log-version (pull request #185)
inject and print version at startup for all services

* inject and print version

* coverage
2025-09-18 21:06:21 +00:00

43 lines
1.1 KiB
YAML

---
# https://taskfile.dev
version: "3"
vars:
DOCKERFILE: "build/Dockerfile"
BUILD_TIME:
sh: date -u +"%Y-%m-%dT%H:%M:%SZ"
GIT_SHORT_COMMIT:
sh: git rev-parse --short HEAD
GIT_VERSION:
sh: echo "$(date -u +"%Y%m%d.%H%M%S")-$(git rev-parse --short HEAD)"
GIT_COMMIT:
sh: git rev-parse HEAD
tasks:
lint:
cmds:
- hadolint {{.DOCKERFILE}} -t none
build:
run: once
cmd: |
# Build with caching enabled
docker build \
--build-arg "GIT_VERSION={{.GIT_VERSION}}" \
--build-arg "GIT_COMMIT={{.GIT_COMMIT}}" \
--build-arg "BUILD_TIME={{.BUILD_TIME}}" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
-t {{.IMAGE_NAME}}:latest \
-t {{.IMAGE_NAME}}:{{.GIT_VERSION}} \
-f {{.DOCKERFILE}} .
build:debug:
run: once
cmd: |
# Build debug image with Delve debugger
docker build \
--build-arg "GIT_VERSION={{.GIT_VERSION}}" \
--build-arg "GIT_COMMIT={{.GIT_COMMIT}}" \
--build-arg "BUILD_TIME={{.BUILD_TIME}}" \
-t {{.IMAGE_NAME}}:debug \
-f build/Dockerfile.debug .