From 894fa62f18bb41392ef31576111e3fbe586a5ba8 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky <38561704+bertsky@users.noreply.github.com> Date: Tue, 1 Oct 2024 19:16:05 +0200 Subject: [PATCH] make docker: pass in VCS_REF and BUILD_DATE, too --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7163056..55cd5e6 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ PROJECT_NAME := ocrd_fileformat TOOLS = ocrd-fileformat-transform -DOCKER_TAG = ocrd/fileformat +DOCKER_BASE_IMAGE ?= docker.io/ocrd/core:v2.69.0 +DOCKER_TAG ?= ocrd/fileformat PIP ?= pip3 @@ -67,7 +68,11 @@ uninstall: # Build Docker image docker: - docker build -t '$(DOCKER_TAG)' . + docker build \ + --build-arg DOCKER_BASE_IMAGE=$(DOCKER_BASE_IMAGE) \ + --build-arg VCS_REF=$$(git rev-parse --short HEAD) \ + --build-arg BUILD_DATE=$$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ + -t $(DOCKER_TAG) . # # Assets