diff --git a/Makefile b/Makefile index 5d54605..abee234 100644 --- a/Makefile +++ b/Makefile @@ -151,8 +151,14 @@ clean: $(RM) -r test/assets docker: build-olena.dockerfile Dockerfile - docker build -t $(DOCKER_TAG):build-olena -f build-olena.dockerfile . - docker build -t $(DOCKER_TAG) . + docker build \ + --build-arg VCS_REF=$$(git rev-parse --short HEAD) \ + --build-arg BUILD_DATE=$$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ + -t $(DOCKER_TAG):build-olena -f build-olena.dockerfile . + docker build \ + --build-arg VCS_REF=$$(git rev-parse --short HEAD) \ + --build-arg BUILD_DATE=$$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ + -t $(DOCKER_TAG) . .PHONY: build-olena clean-olena deps deps-ubuntu help install install-tools test clean docker diff --git a/build-olena.dockerfile b/build-olena.dockerfile index e991b9a..88412e7 100644 --- a/build-olena.dockerfile +++ b/build-olena.dockerfile @@ -1,5 +1,12 @@ # Patch and build Olena from Git FROM ubuntu:18.04 +ARG VCS_REF +ARG BUILD_DATE +LABEL \ + maintainer="https://github.com/OCR-D/ocrd_olena/issues" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-url="https://github.com/OCR-D/ocrd_olena" \ + org.label-schema.build-date=$BUILD_DATE MAINTAINER OCR-D