diff --git a/Dockerfile b/Dockerfile index eafc0f1..6f43f61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,13 @@ # Patch and build Olena from Git, then # Install OCR-D wrapper for binarization -FROM ocrd/core +FROM docker.io/ocrd/core:v2.62.0 AS base +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 @@ -26,7 +33,3 @@ RUN apt-get update && \ WORKDIR /data VOLUME /data - -#ENTRYPOINT ["/usr/bin/ocrd-olena-binarize"] -#CMD ["--help"] -CMD ["/usr/bin/ocrd-olena-binarize", "--help"] 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