From 6b3d9b6c41ee7cb106a16bf2519fc52d3a55804d Mon Sep 17 00:00:00 2001 From: joschrew <91774427+joschrew@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:45:51 +0200 Subject: [PATCH] Add docker arg for base image and change labels --- Dockerfile | 23 +++++++---------------- Makefile | 7 +++++-- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index fb975b0..21ce8bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,12 @@ -FROM ocrd/core-cuda +ARG DOCKER_BASE_IMAGE +FROM $DOCKER_BASE_IMAGE ARG VCS_REF ARG BUILD_DATE -MAINTAINER unixprog@gmail.com -LABEL maintainer="https://ocr-d.de" -LABEL org.label-schema.vendor="DFG-Funded Initiative for Optical Character Recognition Development" -LABEL org.label-schema.name="ocrd_kraken" -LABEL org.label-schema.vcs-ref=$VCS_REF -LABEL org.label-schema.vcs-url="https://github.com/OCR-D/ocrd_kraken" -LABEL org.label-schema.build-date=$BUILD_DATE -LABEL org.opencontainers.image.vendor="DFG-Funded Initiative for Optical Character Recognition Development" -LABEL org.opencontainers.image.title="ocrd_kraken" -LABEL org.opencontainers.image.description="Kraken bindings" -LABEL org.opencontainers.image.source="https://github.com/OCR-D/ocrd_kraken" -LABEL org.opencontainers.image.documentation="https://github.com/OCR-D/ocrd_kraken/blob/${VCS_REF}/README.md" -LABEL org.opencontainers.image.revision=$VCS_REF -LABEL org.opencontainers.image.created=$BUILD_DATE -LABEL org.opencontainers.image.base.name=ocrd/core-cuda +LABEL \ + maintainer="https://ocr-d.de/kontakt" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.vcs-url="https://github.com/OCR-D/ocrd_kraken" \ + org.label-schema.build-date=$BUILD_DATE ENV DEBIAN_FRONTEND noninteractive ENV PYTHONIOENCODING utf8 diff --git a/Makefile b/Makefile index 5acb886..05c6f97 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,8 @@ PYTHONIOENCODING=utf8 # Docker container tag ("$(DOCKER_TAG)") DOCKER_TAG = 'ocrd/kraken' +DOCKER_BASE_IMAGE = docker.io/ocrd/core-cuda:v2.70.0 + # BEGIN-EVAL makefile-parser --make-help Makefile @@ -62,8 +64,9 @@ build: # Build docker image docker: docker build \ - --build-arg VCS_REF=$$(git rev-parse --short HEAD) \ - --build-arg BUILD_DATE=$$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ + --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) . # Run test