feat: Bake build metadata (git tag, commit, date) into OCI image and display in web UI
Store git tag, commit hash, and build date as OCI-standard labels and a build_meta.json file inside the Docker image. The Flask app reads this at startup and displays version info in all page footers. Adds /version JSON endpoint for programmatic access. Falls back to dev@local outside Docker. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
6
Makefile
6
Makefile
@@ -45,7 +45,11 @@ web-debug: $(PYTHON)
|
||||
FLASK_DEBUG=1 $(PYTHON) app.py
|
||||
|
||||
image:
|
||||
docker build -t fuj-management:latest -f build/Dockerfile .
|
||||
docker build -t fuj-management:latest \
|
||||
--build-arg GIT_TAG=$$(git describe --tags --always 2>/dev/null || echo "untagged") \
|
||||
--build-arg GIT_COMMIT=$$(git rev-parse --short HEAD) \
|
||||
--build-arg BUILD_DATE=$$(date -u +%Y-%m-%dT%H:%M:%SZ) \
|
||||
-f build/Dockerfile .
|
||||
|
||||
run:
|
||||
docker run -it --rm -p 5001:5001 -v $(CURDIR)/.secret:/app/.secret:ro fuj-management:latest
|
||||
|
||||
Reference in New Issue
Block a user