Skip to content

Commit

Permalink
Set docker metadata with makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
joschrew committed Feb 12, 2024
1 parent c2e19b8 commit 77e77dc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions build-olena.dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 77e77dc

Please sign in to comment.