Files
query-orchestration/scripts/docker.yml
T

37 lines
874 B
YAML
Raw Normal View History

2025-01-10 11:12:03 +00:00
---
2024-12-19 11:38:57 +00:00
# https://taskfile.dev
version: "3"
2024-12-19 11:38:57 +00:00
vars:
DOCKERFILE: "build/Dockerfile"
2025-06-02 10:44:45 +00:00
GIT_VERSION:
sh: git describe --tags --always
2025-06-02 10:44:45 +00:00
GIT_COMMIT:
sh: git rev-parse HEAD
2024-12-19 11:38:57 +00:00
tasks:
lint:
cmds:
2025-01-10 12:58:14 +00:00
- hadolint {{.DOCKERFILE}} -t none
2024-12-19 11:38:57 +00:00
build:
run: once
2025-06-02 10:44:45 +00:00
cmd: |
# Build with caching enabled
2025-06-02 10:44:45 +00:00
docker build \
--build-arg "GIT_VERSION={{.GIT_VERSION}}" \
--build-arg "GIT_COMMIT={{.GIT_COMMIT}}" \
--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}}" \
-t {{.IMAGE_NAME}}:debug \
-f build/Dockerfile.debug .