This is an automated email from the ASF dual-hosted git repository.

ndipiazza pushed a commit to branch gpg-signed-release-support
in repository https://gitbox.apache.org/repos/asf/tika-grpc-docker.git

commit 26874f504b6be9c358afef3eebb6f958ab443a7b
Author: Nicholas DiPiazza <[email protected]>
AuthorDate: Fri Dec 26 12:48:29 2025 -0600

    Add GPG signed release support for future Tika 4.0.0+ releases
    
    - Add republish-images.sh for rebuilding all versions from signed releases
    - Update README.md with pre-release status and clear build instructions
      - Document current build method (build-from-branch.sh for development)
      - Document future build method (docker-tool.sh with GPG verification)
      - Explain relationship with tika repo Maven builds
    - Add notes to Dockerfiles explaining they require official releases
    - Align with tika-docker GPG verification approach
    
    The Dockerfiles already contain GPG signature verification logic and will
    work automatically once tika-server-grpc-4.0.0.jar is published to Apache
    distribution mirrors. Until then, use build-from-branch.sh to build from 
source.
---
 .idea/.gitignore    | 10 ++++++
 README.md           | 87 ++++++++++++++++++++++++++++++++++++++++++++++++-----
 full/Dockerfile     | 12 +++++++-
 minimal/Dockerfile  | 12 +++++++-
 republish-images.sh | 39 ++++++++++++++++++++++++
 5 files changed, 151 insertions(+), 9 deletions(-)

diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..ab1f416
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,10 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Ignored default folder with query files
+/queries/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/README.md b/README.md
index 8c1f12a..c05c9f5 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,10 @@
 # tika-grpc-docker
 
-This repo is used to create convenience Docker images for Apache Tika Grpc 
Server published as 
[apache/tika-grpc](https://hub.docker.com/r/apache/tika-grpc) on DockerHub by 
the [Apache Tika](http://tika.apache.org) Dev team
+> **⚠️ PRE-RELEASE STATUS:** Apache Tika gRPC Server is currently in 
development and has not been officially released yet. It will first be 
available in **Tika 4.0.0**. Until then, Docker images must be built from 
source code (see "Building from Development Branches" below).
 
-The images create a functional Apache Tika Grpc Server instance that contains 
the latest Ubuntu running the appropriate version's server on Port 50052 using 
Java 17 LTS.
+This repo is used to create convenience Docker images for Apache Tika Grpc 
Server published as 
[apache/tika-grpc](https://hub.docker.com/r/apache/tika-grpc) on DockerHub by 
the [Apache Tika](http://tika.apache.org) Dev team.
+
+Once Tika 4.0.0 is released, the images will create a functional Apache Tika 
Grpc Server instance that contains the latest Ubuntu running the appropriate 
version's server on Port 50052 using Java 17 LTS.
 
 There is a minimal version, which contains only Apache Tika and it's core 
dependencies, and a full version, which also includes dependencies for the GDAL 
and Tesseract OCR parsers. To balance showing functionality versus the size of 
the full image, this file currently installs the language packs for the 
following languages:
 * English
@@ -89,13 +91,61 @@ You can install docker-compose from 
[here](https://docs.docker.com/compose/insta
 
 ## Building
 
-To build the image from scratch, simply invoke:
+### Current Build Method - Building from Development Branches (Pre-Release)
 
-    docker build -t 'apache/tika-grpc' github.com/apache/tika-grpc-docker
-   
-You can then use the following command (using the name you allocated in the 
build command as part of -t option):
+**Since tika-grpc has not been officially released yet**, you must build from 
source code using the `build-from-branch.sh` script:
+
+```bash
+# Build from main branch (recommended for latest development)
+./build-from-branch.sh -b main
+
+# Build from a specific feature branch
+./build-from-branch.sh -b TIKA-4578
+
+# Build with Ignite ConfigStore support
+./build-from-branch.sh -b main -i
+```
+
+This will:
+1. Clone the Apache Tika repository
+2. Build tika-grpc and all dependencies from source
+3. Create a Docker image with the compiled JAR
+4. Run basic tests to verify the image works
+5. Tag as `apache/tika-grpc:<branch-name>`
+
+**Running your built image:**
+
+```bash
+docker run -d -p 127.0.0.1:50052:50052 apache/tika-grpc:main
+```
+
+See the "Building from Development Branches" section below for complete 
documentation and options.
+
+### Future Build Method - Building from Official Apache Releases (Post-4.0.0)
+
+**Once Tika 4.0.0 is officially released**, you'll be able to build Docker 
images from GPG-signed Apache release artifacts using `docker-tool.sh`:
 
-    docker run -d -p 127.0.0.1:50052:50052 apache/tika-grpc
+```bash
+# Build from signed release (future - requires Tika 4.0.0+)
+./docker-tool.sh build 4.0.0 4.0.0
+./docker-tool.sh test 4.0.0
+./docker-tool.sh publish 4.0.0 4.0.0
+```
+
+This will:
+1. Download the signed `tika-server-grpc-4.0.0.jar` from Apache distribution 
mirrors
+2. Download and verify the GPG signature (`.asc` file)
+3. Import Apache KEYS and verify the JAR is properly signed
+4. Build both minimal and full Docker images
+
+**Manual build from release (future):**
+
+```bash
+docker build -t apache/tika-grpc:4.0.0 --build-arg TIKA_VERSION=4.0.0 - < 
minimal/Dockerfile
+docker build -t apache/tika-grpc:4.0.0-full --build-arg TIKA_VERSION=4.0.0 - < 
full/Dockerfile
+```
+
+> **Note:** The `minimal/` and `full/` Dockerfiles are prepared for future 
releases and will NOT work until tika-server-grpc-4.0.0.jar is published to 
Apache distribution mirrors.
     
 ## More Information
 
@@ -184,6 +234,29 @@ There have been a range of 
[contributors](https://github.com/apache/tika-grpc-do
    See the License for the specific language governing permissions and
    limitations under the License.
  
+## Release Process and GPG Verification
+
+### Official Release Images
+
+Official release images are built using GPG-signed Apache release artifacts. 
The Dockerfiles in this repository:
+
+1. Download the `tika-server-grpc-${VERSION}.jar` from Apache distribution 
mirrors
+2. Download the corresponding `.asc` GPG signature file
+3. Import the Apache Tika KEYS file
+4. Verify the GPG signature before using the JAR in the Docker image
+
+This ensures that the Docker images contain only verified, officially released 
Apache Tika artifacts.
+
+### Development/Testing Images
+
+The `build-from-branch.sh` script allows building Docker images from source 
code for testing purposes. These builds:
+- Compile from Git source code
+- Do NOT use GPG-signed releases
+- Are intended for development and testing only
+- Should NOT be used in production
+
+For production use, always build from official Apache releases using the 
standard Dockerfiles and `docker-tool.sh`.
+
 ## Disclaimer
 
 It is worth noting that whilst these Docker images download the binary JARs 
published by the Apache Tika Team on the Apache Software Foundation 
distribution sites, only the source release of an Apache Software Foundation 
project is an official release artefact. See [Release Distribution 
Policy](https://www.apache.org/dev/release-distribution.html) for more details.
diff --git a/full/Dockerfile b/full/Dockerfile
index 2c796cd..f2a4503 100644
--- a/full/Dockerfile
+++ b/full/Dockerfile
@@ -11,6 +11,16 @@
 # the License.
 
 # "random" uid/gid hopefully not used anywhere else
+
+# ============================================================================
+# NOTE: This Dockerfile requires an official Apache Tika release with
+#       tika-server-grpc JAR published to Apache distribution mirrors.
+#       
+#       tika-server-grpc will first be available in Tika 4.0.0.
+#       
+#       Until then, use build-from-branch.sh to build from source:
+#         ./build-from-branch.sh -b main
+# ============================================================================
 # This needs to be set globally and then referenced in
 # the subsequent stages -- see TIKA-3912
 ARG UID_GID="35002:35002"
@@ -74,7 +84,7 @@ COPY --from=fetch_tika /tika-server-grpc-${TIKA_VERSION}.jar 
/tika-server-grpc-$
 USER $UID_GID
 
 EXPOSE 50052
-ENTRYPOINT [ "/bin/sh", "-c", "exec java -cp 
\"/tika-server-grpc-${TIKA_VERSION}.jar:/tika-extras/*\" 
org.apache.tika.pipes.grpc.TikaGrpcServer $0 $@"]
+ENTRYPOINT [ "/bin/sh", "-c", "exec java -cp 
\"/tika-server-grpc-${TIKA_VERSION}.jar:/tika-extras/*\" 
org.apache.tika.pipes.grpc.TikaGrpcServer \"$@\"", "--"]
 
 LABEL maintainer="Apache Tika Developers [email protected]"
 
diff --git a/minimal/Dockerfile b/minimal/Dockerfile
index 3423bd0..9826789 100644
--- a/minimal/Dockerfile
+++ b/minimal/Dockerfile
@@ -11,6 +11,16 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
+
+# ============================================================================
+# NOTE: This Dockerfile requires an official Apache Tika release with
+#       tika-server-grpc JAR published to Apache distribution mirrors.
+#       
+#       tika-server-grpc will first be available in Tika 4.0.0.
+#       
+#       Until then, use build-from-branch.sh to build from source:
+#         ./build-from-branch.sh -b main
+# ============================================================================
 # "random" uid/gid hopefully not used anywhere else
 # This needs to be set globally and then referenced in
 # the subsequent stages -- see TIKA-3912
@@ -65,6 +75,6 @@ ENV TIKA_VERSION=$TIKA_VERSION
 COPY --from=fetch_tika /tika-server-grpc-${TIKA_VERSION}.jar 
/tika-server-grpc-${TIKA_VERSION}.jar
 USER $UID_GID
 EXPOSE 50052
-ENTRYPOINT [ "/bin/sh", "-c", "exec java -cp 
\"/tika-server-grpc-${TIKA_VERSION}.jar:/tika-extras/*\" 
org.apache.tika.pipes.grpc.TikaGrpcServer $0 $@"]
+ENTRYPOINT [ "/bin/sh", "-c", "exec java -cp 
\"/tika-server-grpc-${TIKA_VERSION}.jar:/tika-extras/*\" 
org.apache.tika.pipes.grpc.TikaGrpcServer \"$@\"", "--"]
 
 LABEL maintainer="Apache Tika Developers [email protected]"
diff --git a/republish-images.sh b/republish-images.sh
new file mode 100755
index 0000000..ad19aa1
--- /dev/null
+++ b/republish-images.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+
+
+##
+## Helper script to allow a republish of tika-grpc versions.
+## This builds images from GPG-signed Apache release artifacts.
+##
+
+# tika-grpc was first released in Tika 3.0.0
+# Initial 3.x releases
+for version in 3.0.0; do
+    echo "Building and publishing apache/tika-grpc:${version}"
+    ./docker-tool.sh build "${version}" "${version}"
+    ./docker-tool.sh test "${version}"
+    if [ $? -eq 0 ]; then
+        ./docker-tool.sh publish "${version}" "${version}"
+    else
+        echo "Failed to test and publish version ${version}"
+        echo "$(tput setaf 1)Failed to test and publish image: 
apache/tika-grpc:${version}$(tput sgr0)"
+        exit 1
+    fi
+done

Reply via email to