You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "nddipiazza (via GitHub)" <gi...@apache.org> on 2026/03/27 18:04:19 UTC

[PR] TIKA-4703: Add Docker CI pipelines for tika-server and tika-grpc [tika]

nddipiazza opened a new pull request, #2715:
URL: https://github.com/apache/tika/pull/2715

   ## Summary
   
   Moves Docker build infrastructure into the main tika repo so that Docker image releases are tied directly to Tika releases, eliminating the need for cross-repo coordination with `tika-docker` and `tika-grpc-docker`.
   
   - **Snapshot workflow** (main branch push): builds and pushes `apache/tika`, `apache/tika-full`, and `apache/tika-grpc` snapshot images to Docker Hub
   - **Release workflow** (version tag push): builds and pushes versioned + `latest` tags for all three images
   - **tika-server Dockerfiles**: copied from `tika-docker` repo (source of truth), plus new `Dockerfile.snapshot` variants that use the Maven assembly output instead of downloading from Apache mirrors
   - **tika-grpc docker-build**: Dockerfile, entrypoint script, and build context assembly script
   - **TikaGrpcServer**: now falls back to a bundled empty `default-tika-config.json` from classpath when no `-c` flag is provided, matching standard Java application conventions
   - **Tested locally**: all three images (minimal, full, grpc) build and start successfully
   
   ## Required Setup
   
   `DOCKERHUB_USERNAME` and `DOCKERHUB_TOKEN` secrets must be configured in the repo settings for the workflows to push images.
   
   ## Test plan
   
   - [x] tika-server minimal: HTTP 200 on port 9998, user 35002:35002
   - [x] tika-server full: HTTP 200 on port 9998, user 35002:35002, ImageMagick verified
   - [x] tika-grpc: gRPC server starts on port 9090, all plugins loaded, no config file required
   - [ ] Test Docker push to personal Docker Hub
   - [ ] Verify snapshot workflow triggers on main merge
   - [ ] Verify release workflow triggers on version tag
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] TIKA-4703: Add Docker CI pipelines for tika-server and tika-grpc [tika]

Posted by "nddipiazza (via GitHub)" <gi...@apache.org>.
nddipiazza commented on PR #2715:
URL: https://github.com/apache/tika/pull/2715#issuecomment-4144390857

   Adding clarification: the Docker images are published to the existing Docker Hub repositories:
   
   - **tika-server** (minimal + full): https://hub.docker.com/r/apache/tika
   - **tika-grpc**: https://hub.docker.com/r/apache/tika-grpc
   
   These are the same Docker Hub repos currently used by `tika-docker` and `tika-grpc-docker` — the GitHub Actions workflows will publish to the same locations, just automated from the main tika repo instead of manually.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] TIKA-4703: Add Docker CI pipelines for tika-server and tika-grpc [tika]

Posted by "nddipiazza (via GitHub)" <gi...@apache.org>.
nddipiazza merged PR #2715:
URL: https://github.com/apache/tika/pull/2715


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] TIKA-4703: Add Docker CI pipelines for tika-server and tika-grpc [tika]

Posted by "MartijnVdS (via GitHub)" <gi...@apache.org>.
MartijnVdS commented on code in PR #2715:
URL: https://github.com/apache/tika/pull/2715#discussion_r3079475793


##########
tika-grpc/docker-build/Dockerfile:
##########
@@ -0,0 +1,53 @@
+# Licensed 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.
+
+FROM ubuntu:plucky

Review Comment:
   Ubuntu Plucky (25.04) is not a LTS release, and will be out of support soon.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] TIKA-4703: Add Docker CI pipelines for tika-server and tika-grpc [tika]

Posted by "nddipiazza (via GitHub)" <gi...@apache.org>.
nddipiazza commented on PR #2715:
URL: https://github.com/apache/tika/pull/2715#issuecomment-4154899042

   @bartek
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] TIKA-4703: Add Docker CI pipelines for tika-server and tika-grpc [tika]

Posted by "joepurdy (via GitHub)" <gi...@apache.org>.
joepurdy commented on code in PR #2715:
URL: https://github.com/apache/tika/pull/2715#discussion_r3011359092


##########
tika-grpc/docker-build/Dockerfile:
##########
@@ -0,0 +1,53 @@
+# Licensed 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.
+
+FROM ubuntu:plucky

Review Comment:
   The `tika-server` Dockerfiles run as `USER 35002:35002` (matching the upstream `tika-docker` convention), but this Dockerfile has no USER directive. The gRPC server runs as root. `docker-tool.sh` even asserts 35002:35002 in its test function.
   
   Should just need to add `ARG UID_GID="35002:35002"` like in the `tika-server` Dockerfile and reference that ARG is a `USER` directive.
   
   ```suggestion
   # "random" uid/gid hopefully not used anywhere else
   # This needs to be set globally and then referenced in
   # the subsequent stages -- see TIKA-3912
   ARG UID_GID="35002:35002"
   
   FROM ubuntu:plucky
   ```



##########
tika-grpc/docker-build/Dockerfile:
##########
@@ -0,0 +1,53 @@
+# Licensed 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.
+
+FROM ubuntu:plucky
+COPY libs/ /tika/libs/
+COPY plugins/ /tika/plugins/
+COPY config/ /tika/config/
+COPY bin/ /tika/bin
+ARG JRE='openjdk-17-jre-headless'
+ARG VERSION
+ARG TIKA_GRPC_MAX_INBOUND_MESSAGE_SIZE=104857600
+ARG TIKA_GRPC_MAX_OUTBOUND_MESSAGE_SIZE=104857600
+ARG TIKA_GRPC_NUM_THREADS=4
+RUN set -eux \
+    && apt-get update \
+    && apt-get install --yes --no-install-recommends gnupg2 software-properties-common \
+    && DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends $JRE \
+        gdal-bin \
+        tesseract-ocr \
+        tesseract-ocr-eng \
+        tesseract-ocr-ita \
+        tesseract-ocr-fra \
+        tesseract-ocr-spa \
+        tesseract-ocr-deu \
+    && echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections \
+    && DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
+        xfonts-utils \
+        fonts-freefont-ttf \
+        fonts-liberation \
+        ttf-mscorefonts-installer \
+        wget \
+        cabextract \
+    && apt-get clean -y \
+    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+
+EXPOSE 9090

Review Comment:
   Use the `ARG` suggested previously to run as a nonroot user
   ```suggestion
   USER $UID_GID
   EXPOSE 9090
   ```



##########
tika-grpc/docker-build/Dockerfile:
##########
@@ -0,0 +1,53 @@
+# Licensed 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.
+
+FROM ubuntu:plucky
+COPY libs/ /tika/libs/
+COPY plugins/ /tika/plugins/
+COPY config/ /tika/config/
+COPY bin/ /tika/bin
+ARG JRE='openjdk-17-jre-headless'

Review Comment:
   The `tika-server` images default to `openjdk-21-jre-headless`. Any reason to pin grpc to 17? If intentional, might be worth a comment explaining why, otherwise someone will "fix" it later and potentially break something.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] TIKA-4703: Add Docker CI pipelines for tika-server and tika-grpc [tika]

Posted by "nddipiazza (via GitHub)" <gi...@apache.org>.
nddipiazza commented on code in PR #2715:
URL: https://github.com/apache/tika/pull/2715#discussion_r3100525459


##########
tika-grpc/docker-build/Dockerfile:
##########
@@ -0,0 +1,53 @@
+# Licensed 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.
+
+FROM ubuntu:plucky
+COPY libs/ /tika/libs/
+COPY plugins/ /tika/plugins/
+COPY config/ /tika/config/
+COPY bin/ /tika/bin
+ARG JRE='openjdk-17-jre-headless'
+ARG VERSION
+ARG TIKA_GRPC_MAX_INBOUND_MESSAGE_SIZE=104857600
+ARG TIKA_GRPC_MAX_OUTBOUND_MESSAGE_SIZE=104857600
+ARG TIKA_GRPC_NUM_THREADS=4
+RUN set -eux \
+    && apt-get update \
+    && apt-get install --yes --no-install-recommends gnupg2 software-properties-common \
+    && DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends $JRE \
+        gdal-bin \
+        tesseract-ocr \
+        tesseract-ocr-eng \
+        tesseract-ocr-ita \
+        tesseract-ocr-fra \
+        tesseract-ocr-spa \
+        tesseract-ocr-deu \
+    && echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections \
+    && DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
+        xfonts-utils \
+        fonts-freefont-ttf \
+        fonts-liberation \
+        ttf-mscorefonts-installer \
+        wget \
+        cabextract \
+    && apt-get clean -y \
+    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+
+EXPOSE 9090

Review Comment:
   I pushed a fix for this on the updated branch. Could you please repeat the analysis when you have a moment?



##########
tika-grpc/docker-build/Dockerfile:
##########
@@ -0,0 +1,53 @@
+# Licensed 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.
+
+FROM ubuntu:plucky

Review Comment:
   I pushed a fix for this on the updated branch. Could you please repeat the analysis when you have a moment?



##########
tika-grpc/docker-build/Dockerfile:
##########
@@ -0,0 +1,53 @@
+# Licensed 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.
+
+FROM ubuntu:plucky
+COPY libs/ /tika/libs/
+COPY plugins/ /tika/plugins/
+COPY config/ /tika/config/
+COPY bin/ /tika/bin
+ARG JRE='openjdk-17-jre-headless'

Review Comment:
   I pushed a fix for this on the updated branch. Could you please repeat the analysis when you have a moment?



##########
tika-grpc/docker-build/Dockerfile:
##########
@@ -0,0 +1,53 @@
+# Licensed 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.
+
+FROM ubuntu:plucky

Review Comment:
   I pushed a fix for this on the updated branch. Could you please repeat the analysis when you have a moment?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@tika.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org