This is an automated email from the ASF dual-hosted git repository.
tballison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/main by this push:
new 200c9c1c8f Add OCI standard image labels to Docker images (#2846)
200c9c1c8f is described below
commit 200c9c1c8fed2736df8a7bcc505fb5e12184bd33
Author: Erwan Hervé <[email protected]>
AuthorDate: Mon Jul 13 16:09:02 2026 +0200
Add OCI standard image labels to Docker images (#2846)
* chore: add OCI standard labels to Docker images
Add org.opencontainers.image.* labels to all five Dockerfiles
(tika-server minimal, tika-server full, tika-grpc) and wire the
dynamic labels (version, revision, created) as build-args in both
CI workflows (docker-release.yml and docker-snapshot.yml).
No changes to Tika itself — Docker metadata only.
Signed-off-by: Erwan Hervé <[email protected]>
* ci: derive image.created from commit date for reproducible builds
Pin org.opencontainers.image.created to the commit timestamp
(git show -s --format=%cI HEAD) instead of the build-time clock, so
identical sources produce identical labels. Aligns with the
SOURCE_DATE_EPOCH convention and keeps created consistent with the
revision label, which already points at the source commit.
Signed-off-by: Erwan Hervé <[email protected]>
---------
Signed-off-by: Erwan Hervé <[email protected]>
Signed-off-by: Erwan Hervé <[email protected]>
---
.github/workflows/docker-release.yml | 18 ++++++++++++++++++
.github/workflows/docker-snapshot.yml | 18 ++++++++++++++++++
tika-grpc/docker-build/Dockerfile | 14 +++++++++++++-
tika-server/docker-build/full/Dockerfile | 15 +++++++++++++--
tika-server/docker-build/full/Dockerfile.snapshot | 14 +++++++++++++-
tika-server/docker-build/minimal/Dockerfile | 14 +++++++++++++-
tika-server/docker-build/minimal/Dockerfile.snapshot | 14 +++++++++++++-
7 files changed, 101 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/docker-release.yml
b/.github/workflows/docker-release.yml
index cbdc817f9f..a108aefe4e 100644
--- a/.github/workflows/docker-release.yml
+++ b/.github/workflows/docker-release.yml
@@ -130,6 +130,12 @@ jobs:
echo "grpc<<EOF"; echo "$grpc"; echo "EOF"
} >> "$GITHUB_OUTPUT"
+ - name: Set build metadata
+ id: meta
+ run: |
+ echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
+ echo "created=$(git show -s --format=%cI HEAD)" >> "$GITHUB_OUTPUT"
+
- name: Set up Docker Buildx
uses:
docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
@@ -150,6 +156,8 @@ jobs:
push: true
build-args: |
TIKA_VERSION=${{ env.TAG }}
+ REVISION=${{ steps.meta.outputs.sha }}
+ CREATED=${{ steps.meta.outputs.created }}
tags: ${{ steps.tags.outputs.minimal }}
- name: Build and push tika-server full
@@ -160,6 +168,8 @@ jobs:
push: true
build-args: |
TIKA_VERSION=${{ env.TAG }}
+ REVISION=${{ steps.meta.outputs.sha }}
+ CREATED=${{ steps.meta.outputs.created }}
tags: ${{ steps.tags.outputs.full }}
# After a successful publish, push a `<tag>-<build_number>` git tag for
@@ -186,6 +196,12 @@ jobs:
with:
ref: ${{ inputs.source_ref || env.TAG }}
+ - name: Set build metadata
+ id: meta
+ run: |
+ echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
+ echo "created=$(git show -s --format=%cI HEAD)" >> "$GITHUB_OUTPUT"
+
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
@@ -266,6 +282,8 @@ jobs:
push: true
build-args: |
VERSION=${{ env.TAG }}
+ REVISION=${{ steps.meta.outputs.sha }}
+ CREATED=${{ steps.meta.outputs.created }}
# apache/tika-grpc is new in 4.x with no prior `:latest` to protect,
so
# we track latest from the start (unlike apache/tika the server
image,
# whose :latest stays on 3.x until 4.0.0 GA).
diff --git a/.github/workflows/docker-snapshot.yml
b/.github/workflows/docker-snapshot.yml
index 91d0ba4cf5..71e078a824 100644
--- a/.github/workflows/docker-snapshot.yml
+++ b/.github/workflows/docker-snapshot.yml
@@ -75,6 +75,12 @@ jobs:
TIKA_VERSION=$(mvn help:evaluate -Dexpression=project.version -q
-DforceStdout)
echo "tika_version=${TIKA_VERSION}" >> "$GITHUB_OUTPUT"
+ - name: Set build metadata
+ id: meta
+ run: |
+ echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
+ echo "created=$(git show -s --format=%cI HEAD)" >> "$GITHUB_OUTPUT"
+
- name: Build with Maven (skip tests)
run: mvn clean install -DskipTests -B
"-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
@@ -107,6 +113,8 @@ jobs:
load: true
build-args: |
TIKA_VERSION=${{ steps.version.outputs.tika_version }}
+ REVISION=${{ steps.meta.outputs.sha }}
+ CREATED=${{ steps.meta.outputs.created }}
tags: tika-server-minimal-smoke:ci
- name: Smoke test tika-server minimal image
@@ -139,6 +147,8 @@ jobs:
push: true
build-args: |
TIKA_VERSION=${{ steps.version.outputs.tika_version }}
+ REVISION=${{ steps.meta.outputs.sha }}
+ CREATED=${{ steps.meta.outputs.created }}
tags: |
apache/tika:${{ steps.version.outputs.tika_version }}
@@ -159,6 +169,8 @@ jobs:
load: true
build-args: |
TIKA_VERSION=${{ steps.version.outputs.tika_version }}
+ REVISION=${{ steps.meta.outputs.sha }}
+ CREATED=${{ steps.meta.outputs.created }}
tags: tika-server-full-smoke:ci
- name: Smoke test tika-server full image
@@ -191,6 +203,8 @@ jobs:
push: true
build-args: |
TIKA_VERSION=${{ steps.version.outputs.tika_version }}
+ REVISION=${{ steps.meta.outputs.sha }}
+ CREATED=${{ steps.meta.outputs.created }}
tags: |
apache/tika:${{ steps.version.outputs.tika_version }}-full
@@ -240,6 +254,8 @@ jobs:
load: true
build-args: |
VERSION=${{ steps.version.outputs.tika_version }}
+ REVISION=${{ steps.meta.outputs.sha }}
+ CREATED=${{ steps.meta.outputs.created }}
tags: tika-grpc-smoke:ci
- name: Smoke test tika-grpc image
@@ -274,5 +290,7 @@ jobs:
push: true
build-args: |
VERSION=${{ steps.version.outputs.tika_version }}
+ REVISION=${{ steps.meta.outputs.sha }}
+ CREATED=${{ steps.meta.outputs.created }}
tags: |
apache/tika-grpc:${{ steps.version.outputs.tika_version }}
diff --git a/tika-grpc/docker-build/Dockerfile
b/tika-grpc/docker-build/Dockerfile
index ac28edbf2d..1a19270261 100644
--- a/tika-grpc/docker-build/Dockerfile
+++ b/tika-grpc/docker-build/Dockerfile
@@ -61,4 +61,16 @@ ENV
TIKA_GRPC_MAX_OUTBOUND_MESSAGE_SIZE=$TIKA_GRPC_MAX_OUTBOUND_MESSAGE_SIZE
ENV TIKA_GRPC_NUM_THREADS=$TIKA_GRPC_NUM_THREADS
ENTRYPOINT ["/tika/bin/start-tika-grpc.sh"]
-LABEL maintainer="Apache Tika Developers [email protected]"
+ARG REVISION
+ARG CREATED
+LABEL maintainer="Apache Tika Developers [email protected]" \
+ org.opencontainers.image.title="Apache Tika gRPC Server" \
+ org.opencontainers.image.description="Apache Tika content detection and
analysis server with gRPC interface" \
+ org.opencontainers.image.url="https://hub.docker.com/r/apache/tika-grpc"
\
+ org.opencontainers.image.source="https://github.com/apache/tika" \
+ org.opencontainers.image.documentation="https://tika.apache.org/" \
+ org.opencontainers.image.vendor="Apache Software Foundation" \
+ org.opencontainers.image.licenses="Apache-2.0" \
+ org.opencontainers.image.version="${VERSION}" \
+ org.opencontainers.image.revision="${REVISION}" \
+ org.opencontainers.image.created="${CREATED}"
diff --git a/tika-server/docker-build/full/Dockerfile
b/tika-server/docker-build/full/Dockerfile
index 61098b92df..722b22aab2 100644
--- a/tika-server/docker-build/full/Dockerfile
+++ b/tika-server/docker-build/full/Dockerfile
@@ -89,5 +89,16 @@ EXPOSE 9998
# tika-server auto-discovers pf4j plugins from /opt/tika-server/plugins/.
ENTRYPOINT [ "/bin/sh", "-c", "exec java -cp
\"/opt/tika-server/*:/opt/tika-server/lib/*:/tika-extras/*\"
org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $0 $@"]
-LABEL maintainer="Apache Tika Developers [email protected]"
-
+ARG REVISION
+ARG CREATED
+LABEL maintainer="Apache Tika Developers [email protected]" \
+ org.opencontainers.image.title="Apache Tika Server (full)" \
+ org.opencontainers.image.description="Apache Tika content detection and
analysis server with OCR, fonts, and GDAL support" \
+ org.opencontainers.image.url="https://hub.docker.com/r/apache/tika" \
+ org.opencontainers.image.source="https://github.com/apache/tika" \
+ org.opencontainers.image.documentation="https://tika.apache.org/" \
+ org.opencontainers.image.vendor="Apache Software Foundation" \
+ org.opencontainers.image.licenses="Apache-2.0" \
+ org.opencontainers.image.version="${TIKA_VERSION}" \
+ org.opencontainers.image.revision="${REVISION}" \
+ org.opencontainers.image.created="${CREATED}"
diff --git a/tika-server/docker-build/full/Dockerfile.snapshot
b/tika-server/docker-build/full/Dockerfile.snapshot
index 3fb6b6d698..5dc5dd253a 100644
--- a/tika-server/docker-build/full/Dockerfile.snapshot
+++ b/tika-server/docker-build/full/Dockerfile.snapshot
@@ -53,4 +53,16 @@ USER $UID_GID
EXPOSE 9998
ENTRYPOINT [ "/bin/sh", "-c", "exec java -cp
\"/opt/tika-server/*:/opt/tika-server/lib/*:/tika-extras/*\"
org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $0 $@"]
-LABEL maintainer="Apache Tika Developers [email protected]"
+ARG REVISION
+ARG CREATED
+LABEL maintainer="Apache Tika Developers [email protected]" \
+ org.opencontainers.image.title="Apache Tika Server (full)" \
+ org.opencontainers.image.description="Apache Tika content detection and
analysis server with OCR, fonts, and GDAL support" \
+ org.opencontainers.image.url="https://hub.docker.com/r/apache/tika" \
+ org.opencontainers.image.source="https://github.com/apache/tika" \
+ org.opencontainers.image.documentation="https://tika.apache.org/" \
+ org.opencontainers.image.vendor="Apache Software Foundation" \
+ org.opencontainers.image.licenses="Apache-2.0" \
+ org.opencontainers.image.version="${TIKA_VERSION}" \
+ org.opencontainers.image.revision="${REVISION}" \
+ org.opencontainers.image.created="${CREATED}"
diff --git a/tika-server/docker-build/minimal/Dockerfile
b/tika-server/docker-build/minimal/Dockerfile
index 342d521e1f..9b6bf14a4c 100644
--- a/tika-server/docker-build/minimal/Dockerfile
+++ b/tika-server/docker-build/minimal/Dockerfile
@@ -81,4 +81,16 @@ EXPOSE 9998
# tika-server auto-discovers pf4j plugins from /opt/tika-server/plugins/.
ENTRYPOINT [ "/bin/sh", "-c", "exec java -cp
\"/opt/tika-server/*:/opt/tika-server/lib/*:/tika-extras/*\"
org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $0 $@"]
-LABEL maintainer="Apache Tika Developers [email protected]"
+ARG REVISION
+ARG CREATED
+LABEL maintainer="Apache Tika Developers [email protected]" \
+ org.opencontainers.image.title="Apache Tika Server" \
+ org.opencontainers.image.description="Apache Tika content detection and
analysis server - lightweight JRE-only build" \
+ org.opencontainers.image.url="https://hub.docker.com/r/apache/tika" \
+ org.opencontainers.image.source="https://github.com/apache/tika" \
+ org.opencontainers.image.documentation="https://tika.apache.org/" \
+ org.opencontainers.image.vendor="Apache Software Foundation" \
+ org.opencontainers.image.licenses="Apache-2.0" \
+ org.opencontainers.image.version="${TIKA_VERSION}" \
+ org.opencontainers.image.revision="${REVISION}" \
+ org.opencontainers.image.created="${CREATED}"
diff --git a/tika-server/docker-build/minimal/Dockerfile.snapshot
b/tika-server/docker-build/minimal/Dockerfile.snapshot
index 3de9c52395..55eb708de7 100644
--- a/tika-server/docker-build/minimal/Dockerfile.snapshot
+++ b/tika-server/docker-build/minimal/Dockerfile.snapshot
@@ -35,4 +35,16 @@ USER $UID_GID
EXPOSE 9998
ENTRYPOINT [ "/bin/sh", "-c", "exec java -cp
\"/opt/tika-server/*:/opt/tika-server/lib/*:/tika-extras/*\"
org.apache.tika.server.core.TikaServerCli -h 0.0.0.0 $0 $@"]
-LABEL maintainer="Apache Tika Developers [email protected]"
+ARG REVISION
+ARG CREATED
+LABEL maintainer="Apache Tika Developers [email protected]" \
+ org.opencontainers.image.title="Apache Tika Server" \
+ org.opencontainers.image.description="Apache Tika content detection and
analysis server - lightweight JRE-only build" \
+ org.opencontainers.image.url="https://hub.docker.com/r/apache/tika" \
+ org.opencontainers.image.source="https://github.com/apache/tika" \
+ org.opencontainers.image.documentation="https://tika.apache.org/" \
+ org.opencontainers.image.vendor="Apache Software Foundation" \
+ org.opencontainers.image.licenses="Apache-2.0" \
+ org.opencontainers.image.version="${TIKA_VERSION}" \
+ org.opencontainers.image.revision="${REVISION}" \
+ org.opencontainers.image.created="${CREATED}"